FanRotator.cs 391 B

1234567891011121314151617
  1. using UnityEngine;
  2. public class FanRotator : MonoBehaviour {
  3. Transform thisTransform;
  4. public float speed = 90;
  5. // Start is called before the first frame update
  6. void Start() {
  7. thisTransform = GetComponent<Transform>();
  8. }
  9. // Update is called once per frame
  10. void Update() {
  11. thisTransform.Rotate(0, speed * Time.deltaTime, 0, Space.Self);
  12. }
  13. }