chenxin
2020-11-05 d6161eec964b2eeb23bd93c84c29f8ffd3a2d06f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using UnityEngine;
 
namespace TowerDefense.UI
{
    /// <summary>
    /// A simple component that applies a constant rotation to a transform
    /// </summary>
    public class Rotator : MonoBehaviour
    {
        public Vector3 rotationSpeed;
    
        void Update ()
        {
            transform.localEulerAngles += rotationSpeed;
        }
    }
}