GGJ2022/Assets/Scripts/PlatformManager.cs

25 lines
528 B
C#
Raw Normal View History

2022-01-29 00:19:21 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlatformManager : MonoBehaviour
{
2022-01-29 00:47:41 +00:00
public enum PlatformType {Pull, Push, RotateZ, RotateY, Speed};
2022-01-29 00:19:21 +00:00
public PlatformType type = PlatformType.Pull;
void Start()
{
}
void FixedUpdate()
{
2022-01-29 00:47:41 +00:00
if (type == PlatformType.RotateZ)
2022-01-29 00:19:21 +00:00
{
transform.Rotate(transform.forward);
2022-01-29 00:47:41 +00:00
} else if (type == PlatformType.RotateY) {
transform.Rotate(transform.up);
2022-01-29 00:19:21 +00:00
}
}
}