using asap.core; using GameCore; using UnityEngine; using UnityEngine.UI; public class SettingNotificationsPopupPanel : MonoBehaviour { public Button btn_ok; public Button btn_cancel; private ILocalNotificationService notifications; private void Start() { notifications = GContext.container.Resolve(); btn_ok.onClick.AddListener(OnBtnOk); btn_cancel.onClick.AddListener(DestroyUI); } private void OnBtnOk() { if (this == null) { return; } (notifications as LocalNotificationService)?.RequirePromptOwner(); DestroyUI(); notifications.OpenSettings(); } void DestroyUI() { if (this == null) { return; } (notifications as LocalNotificationService)?.RequirePromptOwner(); UIManager.Instance.DestroyUI(gameObject.name); } }