SFX_Rotator.cs 432 B

1234567891011121314151617181920
  1. using UnityEngine;
  2. // ReSharper disable once CheckNamespace
  3. namespace QFX.SFX
  4. {
  5. public class SFX_Rotator : SFX_ControlledObject
  6. {
  7. public Vector3 Rotation;
  8. private Vector3 _rotation;
  9. private void Update()
  10. {
  11. if (!IsRunning)
  12. return;
  13. _rotation += Rotation * Time.deltaTime;
  14. transform.rotation = Quaternion.Euler(_rotation);
  15. }
  16. }
  17. }