Edit platformManager

This commit is contained in:
haitem 2022-01-29 01:47:41 +01:00
parent 807187e5bf
commit bccb63d7e9
1 changed files with 4 additions and 2 deletions

View File

@ -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);
}
}
}