using UnityEngine; using UnityEngine.UI; // ReSharper disable once CheckNamespace namespace BlueWaterProject { public class RadarTargetUI : MonoBehaviour { public float RotationZ { get; private set; } public Image Image { get; private set; } private void OnEnable() { Image = GetComponent(); } private void Update() { transform.rotation = Quaternion.Euler(0, 0, RotationZ + Image.fillAmount * -180); } /// /// 레이더 타겟 초기화 (노란색 부분) /// /// 위치 조절 /// 크기 조절 0.1 = 360의 10퍼센트 public void RadarTargetInit(float rotation, float fillAmount) { RotationZ = rotation; Image.fillAmount = fillAmount; } } }