From bccb63d7e9ff4e5062d85240a084a6c44da0c31b Mon Sep 17 00:00:00 2001 From: haitem Date: Sat, 29 Jan 2022 01:47:41 +0100 Subject: [PATCH] Edit platformManager --- Assets/Scripts/PlatformManager.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/PlatformManager.cs b/Assets/Scripts/PlatformManager.cs index 22923ad..42a994b 100644 --- a/Assets/Scripts/PlatformManager.cs +++ b/Assets/Scripts/PlatformManager.cs @@ -4,7 +4,7 @@ using UnityEngine; public class PlatformManager : MonoBehaviour { - public enum PlatformType {Pull, Push, Rotate}; + public enum PlatformType {Pull, Push, RotateZ, RotateY, Speed}; public PlatformType type = PlatformType.Pull; void Start() @@ -14,9 +14,11 @@ public class PlatformManager : MonoBehaviour void FixedUpdate() { - if (type == PlatformType.Rotate) + if (type == PlatformType.RotateZ) { transform.Rotate(transform.forward); + } else if (type == PlatformType.RotateY) { + transform.Rotate(transform.up); } } }