OldBlueWater/BlueWater/Assets/02.Scripts/Ui/RadarNeedle.cs

19 lines
512 B
C#
Raw Normal View History

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 05:15:18 +00:00
transform.Rotate(0, 0, RotationSpeed * Time.deltaTime);
}
}
}