using System; using UnityEngine; namespace Fort23.Mono { public class UIToggleObjectCustomStateWidget : UIToggleWidgetBasic { public CustomStateController CustomStateController; [HideInInspector] public Action showCallback; [HideInInspector] public Action hideCallback; private void Awake() { if (CustomStateController == null) { CustomStateController = gameObject.GetComponent(); } } public override void Show() { CustomStateController?.ChangeState(1); showCallback?.Invoke(); } public override void Hind() { CustomStateController?.ChangeState(0); hideCallback?.Invoke(); } } }