Rotator.cs 270 B

123456789101112
  1. using UnityEngine;
  2. namespace Spine.Unity.Examples {
  3. public class Rotator : MonoBehaviour {
  4. public Vector3 direction = new Vector3(0, 0, 1f);
  5. public float speed = 1f;
  6. void Update () {
  7. transform.Rotate(direction * (speed * Time.deltaTime * 100f));
  8. }
  9. }
  10. }