public void hide() { _nextButtonVisible = false; _renderTextIndex = -1; hideArrow(); hideHand(); popupTutorial.hide(); hideDialog(); gameObject.SetActive(false); showDim(false); spBackground.gameObject.SetActive(false); goBigDialogPanel.SetActive(false); skillGuide.gameObject.SetActive(false); if (rewardPopup.gameObject.activeSelf) { rewardPopup.hide(); } verticalDim.gameObject.SetActive(false); yesAction = null; noAction = null; TutorialManager.instance.skipThisTime = false; }
public static void openFirst(PopupType type, string msg = "", PopupData.PopupAction yesAction = null, PopupData.PopupAction closeAction = null, params object[] data) { PopupData pd = getPopupDataFromPool(); pd.setData(type, msg, yesAction, closeAction, data); if (_closePopupData != null && (nowPopupData != null && nowPopupData == _closePopupData)) { nowPopupData = null; } if (nowPopupData != null) { _popups.Insert(0, nowPopupData); if (nowPopupData.popupType != pd.popupType) { UISystemPopupBase p = getPopupByType(nowPopupData.popupType); if (p != null) { p.gameObject.SetActive(false); } } nowPopupData = null; } open(pd); }
public static void checkLevelupPopupWithoutCallback(PopupData.PopupAction popupAction = null) { if (needLevelupPopup) { needLevelupPopup = false; UISystemPopup.open(UISystemPopup.PopupType.LevelUp, GameDataManager.instance.level + "", popupAction, popupAction); } }
public void show(int gold, PopupData.PopupAction okCallback) { GameManager.me.uiManager.menuCamera3.gameObject.SetActive(true); // * 환전은 기준 '루비->골드' 환율 적용 (1루비 = 250골드) // * 환율 적용 계산 후 루비개수의 소수점은 무조건 올림으로 맞춤 (예: 필요 골드 200일 때, 0.8루비 -> 1루비) // * 보유 루비가 부족한 경우 루비 상점 팝업 _gold = gold; int needRuby = Mathf.CeilToInt((float)(_gold - GameDataManager.instance.gold) / GameDataManager.instance.goldForRuby); string goldDiff = Util.GetCommaScore(_gold - GameDataManager.instance.gold); yesCallback = okCallback; _openRubyShop = false; if (GameDataManager.instance.gold >= _gold) { okCallback(); } else if (GameDataManager.instance.ruby < needRuby) { if (TutorialManager.instance.isTutorialMode) { return; } show(); lbMsg.text = Util.getUIText("NOTENOUGH_GOLD_BUYRUBY", goldDiff); lbPrice.text = needRuby + ""; lbPrice.color = Color.red; _openRubyShop = true; } else { if (TutorialManager.instance.isTutorialMode) { return; } show(); lbMsg.text = Util.getUIText("NOTENOUGH_GOLD_BUYRUBY", goldDiff); lbPrice.text = needRuby + ""; lbPrice.color = Color.white; } }
public static void open(PopupType type, string msg = "", PopupData.PopupAction yesAction = null, PopupData.PopupAction closeAction = null, params object[] data) { PopupData pd = getPopupDataFromPool(); pd.setData(type, msg, yesAction, closeAction, data); if (_closePopupData != null && (nowPopupData != null && nowPopupData == _closePopupData)) { nowPopupData = null; } // 새로 띄울 팝업이 시스템 에러면 얘가 최우선 순위 되겠다. // 기존에 떠있는 팝업이 있으면 저장해놓고 얘를 먼저 보여준다. if (type == PopupType.SystemError) { if (nowPopupData != null) { _popups.Insert(0, nowPopupData); nowPopupData = null; } open(pd); } // 일반 팝업일때는 현재 보여지는 팝업이 있으면 뒤에 쌓아놓고 아니면 바로 보여준다. else { if (nowPopupData != null) { _popups.Add(pd); } else { open(pd); } } }
public void setYesNoCallback(PopupData.PopupAction yes, PopupData.PopupAction no) { yesAction = yes; noAction = no; }