using System.Collections; using Sirenix.OdinInspector; using UnityEngine; using UnityEngine.UIElements; using VOID.Generic.Objects.Abstract.Events; using VOID.Generic.Objects.Unit; using VOID.Generic.Objects.Unit.Actions.Exceptions; using VOID.Generic.Objects.Unit.Events; namespace VOID.UserInterface.Game.AlertUI { public class AlertUI : MonoBehaviour { public static AlertUI current { get; private set; } [SerializeField, MinValue(0)] private float timeToHideAlert = 3f; [SerializeField] private string DEATH_MESSAGE = "Died!"; [SerializeField] private string TURN_START = "Turn start"; [SerializeField] private string ACTION_ERROR_MESSAGE = "Action prevented: {0}"; private Label _label; private VisualElement _root; private Coroutine _hideAlertCoroutine; private void Awake() { current = this; var uiDocument = gameObject.GetComponent(); _root = uiDocument.rootVisualElement; _label = _root.Q