2026.06.25 Fishing scene
This commit is contained in:
@@ -5,15 +5,22 @@ public class RotateUI : MonoBehaviour
|
||||
[Header("Rotation Settings")]
|
||||
[SerializeField] private float rotateSpeed = 30f;
|
||||
[SerializeField] private bool clockwise = true;
|
||||
[SerializeField] private bool playOnStart = true;
|
||||
[SerializeField] private bool playOnStart = false;
|
||||
|
||||
private bool isRotating;
|
||||
|
||||
public bool IsRotating => isRotating;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
isRotating = playOnStart;
|
||||
}
|
||||
|
||||
private void OnValidate()
|
||||
{
|
||||
rotateSpeed = Mathf.Max(0f, rotateSpeed);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (!isRotating)
|
||||
@@ -39,8 +46,13 @@ public void SetClockwise(bool value)
|
||||
clockwise = value;
|
||||
}
|
||||
|
||||
public void SetRotateSpeed(float value)
|
||||
{
|
||||
rotateSpeed = Mathf.Max(0f, value);
|
||||
}
|
||||
|
||||
public void ResetRotation()
|
||||
{
|
||||
transform.localEulerAngles = Vector3.zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user