添加插件
This commit is contained in:
19
Assets/Obvious/Soap/Examples/Content/Scripts/AutoRotator.cs
Normal file
19
Assets/Obvious/Soap/Examples/Content/Scripts/AutoRotator.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Obvious.Soap.Example
|
||||
{
|
||||
public class AutoRotator : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private float _speed = 350f;
|
||||
|
||||
public void Update()
|
||||
{
|
||||
transform.localEulerAngles += _speed * Vector3.up * Time.deltaTime;
|
||||
}
|
||||
|
||||
public void SetRotationSpeed(float value)
|
||||
{
|
||||
_speed = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user