public virtual bool Open(PopupData popupData, float time = -1f) { EventManager_Gameplay.Notify(this, new GameEventArgs(EventManager_Gameplay.PAUSE_GAME)); if (time > 0) { StartCoroutine(Countdown(time)); } if (CurrentStateIndex == (int)WindowStates.Inactive) { this.popupData = popupData; closeOnMissClick = popupData.closeOnMissclick; SetContent(); SetState((int)WindowStates.OpenAnimation); return(true); } else { //Debug.LogWarning("Can't open PopUp, because it's already or still opened!"); return(false); } }
protected override void OpenAnimationStateInitHandler() { base.OpenAnimationStateInitHandler(); EventManager_Gameplay.Notify(this, new GameEventArgs(EventManager_Gameplay.PAUSE_GAME)); }
protected override void InactiveStateInitHandler() { base.InactiveStateInitHandler(); EventManager_Gameplay.Notify(this, new GameEventArgs(EventManager_Gameplay.RESUME_GAME)); }