updates to cameras, texts, and scripts
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user