YanLingRotate.cs 505 B

123456789101112131415161718192021222324
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. /// <summary>
  5. /// 言灵旋转
  6. /// </summary>
  7. public class YanLingRotate : MonoBehaviour
  8. {
  9. private Transform selfTransform = null;
  10. private float speed = 60;
  11. // Start is called before the first frame update
  12. void Start()
  13. {
  14. selfTransform = transform;
  15. }
  16. // Update is called once per frame
  17. void Update()
  18. {
  19. selfTransform.Rotate(Vector3.up * Time.deltaTime * speed);
  20. }
  21. }