22 lines
393 B
C#
22 lines
393 B
C#
using UnityEngine;
|
|
|
|
namespace ParticleFX01
|
|
{
|
|
public class Rotating : MonoBehaviour
|
|
{
|
|
public Vector3 rotationSpeed = Vector3.zero;
|
|
|
|
public Space relativeTo = Space.Self;
|
|
|
|
private void Update()
|
|
{
|
|
base.transform.Rotate(rotationSpeed * Time.deltaTime, relativeTo);
|
|
}
|
|
|
|
public void ForcedRotation(float time)
|
|
{
|
|
base.transform.Rotate(rotationSpeed * time, relativeTo);
|
|
}
|
|
}
|
|
}
|