CamRotator.cs 350 B

123456789101112131415161718192021222324
  1. using UnityEngine;
  2. using System.Collections;
  3. public class CamRotator : MonoBehaviour
  4. {
  5. public bool isActive = false;
  6. public float speed = 0.33f;
  7. // Use this for initialization
  8. void Start ()
  9. {
  10. }
  11. // Update is called once per frame
  12. void Update ()
  13. {
  14. if ( isActive )
  15. transform.Rotate( Vector3.up, speed * Time.deltaTime );
  16. }
  17. }