JustRotate.cs 279 B

123456789101112131415
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class JustRotate : MonoBehaviour {
  5. public bool canRotate=true;
  6. public float speed=10;
  7. void Update ()
  8. {
  9. if(canRotate)
  10. transform.Rotate(speed*Vector3.forward*Time.deltaTime);
  11. }
  12. }