2023-09-11 01:55:36 +00:00
|
|
|
using System;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
// ReSharper disable once CheckNamespace
|
|
|
|
namespace BlueWaterProject
|
|
|
|
{
|
|
|
|
public class RadarNeedle : MonoBehaviour
|
|
|
|
{
|
|
|
|
[field: SerializeField]
|
|
|
|
[field: Tooltip("바늘 회전 속도 \n 360 = 1초에 1바퀴 \n 음수는 시계방향")]
|
|
|
|
public float RotationSpeed { get; set; }
|
|
|
|
private float currentRotationZ = 0f;
|
|
|
|
|
2023-09-11 05:15:18 +00:00
|
|
|
private void FixedUpdate()
|
2023-09-11 01:55:36 +00:00
|
|
|
{
|
2023-09-11 05:15:18 +00:00
|
|
|
transform.Rotate(0, 0, RotationSpeed * Time.deltaTime);
|
2023-09-11 01:55:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|