updates to cameras, texts, and scripts

This commit is contained in:
2024-06-09 11:40:32 +01:00
parent 46d9217f7d
commit 91ca4abbf3
5 changed files with 117 additions and 76 deletions

View File

@@ -6,8 +6,36 @@ public class Rotate : MonoBehaviour
{
// Update is called once per frame
public float m_Speed;
private float m_X;
private float m_Y;
private float m_Z;
public enum Axis
{
X,
Y,
Z
}
public Axis m_Axis;
void Update()
{
this.transform.Rotate(0, -Time.fixedDeltaTime * m_Speed, 0, Space.World);
float speed = -Time.fixedDeltaTime * m_Speed;
m_X = 0;
m_Y = 0;
m_Z = 0;
if (m_Axis == Axis.X)
{
m_X = speed;
} else if (m_Axis == Axis.Y)
{
m_Y = speed;
} else if (m_Axis == Axis.Z)
{
m_Z = speed;
}
this.transform.Rotate(m_X, m_Y, m_Z, Space.World);
}
}