using UnityEngine;
using System.Collections;
public class SpinningCube : MonoBehaviour {
public float m_Speed = 100f;
public float faster = 1f;
private Vector3 m_RotationDirection = Vector3.right;
public void ToggleRotationDirection()
{
Debug.Log ("Toggling rotation direction");
if (m_RotationDirection == Vector3.up)
m_RotationDirection = Vector3.down;
}
else
m_RotationDirection = Vector3.up;
void Update()
Time.timeScale = 5;
transform.Rotate(m_RotationDirection * (Mathf.Sin(Time.time) / 20f) * m_Speed);