using UnityEngine;
namespace EasyTalk.Animation
{
///
/// A component which can be used to automatically rotate an object around an axis over time.
///
public class Rotator : MonoBehaviour
{
///
/// The rotation vector (in Euler angles).
///
[Tooltip("The rotation vector (in Euler angles).")]
[SerializeField]
private Vector3 rotationVector;
///
/// The rotation speed.
///
[Tooltip("The rotation speed.")]
[SerializeField]
private float rotationSpeed = 1.0f;
///
/// Updates the rotation of the object.
///
void Update()
{
this.transform.Rotate(rotationVector * rotationSpeed * Time.deltaTime);
}
}
}