示例#1
0
    public void onStartRound(GameObject go)
    {
        if (GameManager.me.uiManager.uiLoading.gameObject.activeSelf)
        {
            return;
        }

#if UNITY_EDITOR
        if (DebugManager.instance.useDebug)
        {
            GameManager.me.startGame(0.5f);
        }
        else
#endif
        {
            if (GameDataManager.instance.energy > 0)
            {
                EpiServer.instance.sendPlayEpic(_selectedAct, _selectedStage, _selectedRound);

                if (GameDataManager.instance.roundClearStatusCheck(_selectedAct, _selectedStage, _selectedRound) == false)
                {
                    PlayerPrefs.SetInt("CS" + _selectedAct + _selectedStage + _selectedRound, WSDefine.YES);
                }
            }
            else
            {
                UISystemPopup.open(UISystemPopup.PopupType.YesNo, Util.getUIText("GO_TO_ENERGYSHOP"), goToEnergyShop);
            }
        }
    }
示例#2
0
    void onStart(GameObject go)
    {
#if UNITY_EDITOR
        if (DebugManager.instance.useDebug)
        {
            hide();
            startHell();
        }
        else
#endif
        {
            if (GameDataManager.instance.hellTicket > 0)
            {
//				if(Time.realtimeSinceStartup - _lastTouchTime > 1.0f)
                {
                    EpiServer.instance.sendPlayHell();
                    _lastTouchTime = Time.realtimeSinceStartup;
                }
            }
            else
            {
                if (GameDataManager.instance.serviceMode == GameDataManager.ServiceMode.CBT)
                {
                    UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("NO_HELLTICKET", "10"));
                }
                else
                {
                    UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("NO_HELLTICKET", "3"));
                }

                //UISystemPopup.open( UISystemPopup.PopupType.YesNoPrice, Util.getUIText("CHALLENGE_BY_RUBY",GameDataManager.instance.challengeRoundInfo.playNeedRuby.ToString()), onConfirnRubyChallenge, null, GameDataManager.instance.challengeRoundInfo.playNeedRuby.ToString());
            }
        }
    }
示例#3
0
 void onClickGuestId(GameObject go)
 {
     if (GameManager.me.isGuest)
     {
         UISystemPopup.open(UISystemPopup.PopupType.Default, "[ " + Util.getUIText("GUIEST_ID") + " ]\n" + PandoraManager.instance.guestUserId + ".device\n" + PandoraManager.instance.localUser.userID);
     }
 }
    protected override void onClickClose(GameObject go)
    {
        inputField.label.text = inputField.label.text.Trim();

        if (Encoding.UTF8.GetByteCount(inputField.label.text) > 24)
        {
            UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("NICKNAME_OVER"));
        }
        else
        {
            if (checkNickNameCharacter(inputField.label.text) == false)
            {
                UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("NICK_SPACE_ERORR"));
                return;
            }

            if (inputField.label.text.Contains(" "))
            {
                UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("NICK_CHAR_ERROR"));
                return;
            }


            EpiServer.instance.sendSetNickName(inputField.label.text);
        }
    }
示例#5
0
    int onClick(int slotIndex, GameIDData slotData)
    {
        if (sourceListIndex.Contains(slotIndex) == false)
        {
            if (sourceList.Count > 0 && _enoughSelection)
            {
                UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("REINFORCE_UNNECESSARRY"));
                return(0);
            }

            if (sourceListIndex.Count < 5)
            {
                sourceListIndex.Add(slotIndex);
                sourceList.Add(slotData);
                return(1);
            }
            else
            {
                UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("REINFORCE_SELECT_LIMIT"));
            }
        }
        else
        {
            int tempI = sourceListIndex.IndexOf(slotIndex);
            sourceListIndex.RemoveAt(tempI);
            sourceList.RemoveAt(tempI);
            return(-1);
        }
        return(0);
    }
    public static bool priceCheck(ShopItem.Type type, int price, bool openShop = true)
    {
        switch (type)
        {
        case ShopItem.Type.gold:
            if (GameDataManager.instance.gold < price)
            {
                if (openShop)
                {
                    UISystemPopup.open(UISystemPopup.PopupType.GoToGoldShop);
                }
                return(false);
            }
            break;

        case ShopItem.Type.ruby:
            if (GameDataManager.instance.ruby < price)
            {
                if (openShop)
                {
                    UISystemPopup.open(UISystemPopup.PopupType.GoToRubyShop);
                }
                return(false);
            }
            break;
        }

        return(true);
    }
    public void onClickChampionship(GameObject go)
    {
                #if UNITY_EDITOR
        if (DebugManager.instance.useDebug)
        {
            return;
        }
                #endif

        if (GameManager.me.uiManager.uiLoading.gameObject.activeSelf)
        {
            return;
        }



        if (nowPlayingWalkAnimation)
        {
            return;
        }
        if (stageClearRewardPopup.gameObject.activeSelf)
        {
            return;
        }



        if (GameDataManager.instance.roundClearStatusCheck(1, 4, 5) == false)
        {
//			UISystemPopup.open(UISystemPopup.PopupType.Default, "4스테이지를 클리어하면 입장하실 수 있습니다.");
            UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("CHAMP_JOIN_CNDT"));
            return;
        }



        if (GameManager.me.uiManager.popupSummonDetail.gameObject.activeSelf)
        {
            return;
        }



        if ((GameDataManager.instance.championshipStatus != WSDefine.CHAMPIONSHIP_OPEN))
        {
            DateTime checkTime = System.DateTime.Now;

            if (checkTime.DayOfWeek == DayOfWeek.Monday && (checkTime.Hour >= 12))
            {
            }
            else
            {
//				UISystemPopup.open("준비 중입니다.");
                UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("CHAMP_WAITING"));
                return;
            }
        }

        GameManager.me.uiManager.popupChampionship.show();
    }
示例#8
0
    public static void showEndPopup()
    {
        if (_initEndPopupData == false)
        {
            initEndPopupData();
            _initEndPopupData = true;
        }

        if (_endPoupData != null && _endPoupData.Count > 0)
        {
            int chance    = UnityEngine.Random.Range(0, _totalChance) + 1;
            int nowChance = 0;

            for (int i = 0; i < _endPoupData.Count; ++i)
            {
                nowChance += _endPoupData[i].chance;

                if (nowChance >= chance)
                {
                    UISystemPopup.open(UISystemPopup.PopupType.EndGame, _endPoupData[i].imgUrl, null, null, _endPoupData[i].packageName);
                    return;
                }
            }
        }

        UISystemPopup.open(UISystemPopup.PopupType.YesNo, Util.getUIText("END_GAME"), GameManager.me.OnApplicationQuit, null);
    }
示例#9
0
    void onClickPVP(GameObject go)
    {
        int leftNum = GameDataManager.instance.friendlyPVPMax;

        if (GameDataManager.instance.friendlyPVPIds != null)
        {
            leftNum = GameDataManager.instance.friendlyPVPMax - GameDataManager.instance.friendlyPVPIds.Length;

            if (leftNum <= 0)
            {
                UISystemPopup.open(Util.getUIText("FRIENDLY_OVERLIMIT"));
                return;
            }
            else
            {
                foreach (string id in GameDataManager.instance.friendlyPVPIds)
                {
                    if (id == data.userId)
                    {
                        UISystemPopup.open(Util.getUIText("FRIENDLY_ALREADY"));
                        return;
                    }
                }
            }
        }

        GameManager.me.uiManager.popupFriendlyPVPAttack.show();
        GameManager.me.uiManager.popupFriendlyPVPAttack.setData(data.userId, leftNum, data.pvpReward);
    }
    void onClickPVP(GameObject go)
    {
        if (GameManager.me.uiManager.uiMenu.uiFriend.slotMachine.isReady == false)
        {
            return;
        }

        int leftNum = GameDataManager.instance.friendlyPVPMax;

        if (GameDataManager.instance.friendlyPVPIds != null)
        {
            leftNum = GameDataManager.instance.friendlyPVPMax - GameDataManager.instance.friendlyPVPIds.Length;

            if (leftNum <= 0)
            {
                UISystemPopup.open("오늘의 친선경기 횟수를 초과했습니다.");
                return;
            }
            else
            {
                foreach (string id in GameDataManager.instance.friendlyPVPIds)
                {
                    if (id == data.userId)
                    {
                        UISystemPopup.open("오늘 이미 대전한 친구입니다.");
                        return;
                    }
                }
            }
        }

        GameManager.me.uiManager.popupFriendlyPVPAttack.show();
        GameManager.me.uiManager.popupFriendlyPVPAttack.setData(data.userId, leftNum, data.pvpReward);
    }
示例#11
0
    void onClickEvolution(GameObject go)
    {
        if (btnClose.gameObject.activeSelf == false)
        {
            return;
        }

        if (popupType == RuneInfoPopup.Type.Reinforce && RuneStudioMain.instance.step != RuneStudioMain.Step.Finish)
        {
            Debug.Log("wait...");
            return;
        }

        if (data.rare >= RareType.SS)
        {
            UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("EVOLVE_NOMORE"));
            return;
        }
        else if (data.rare != RareType.S || data.reinforceLevel < 20)
        {
            UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("EVOLVE_LEVELLIMIT"));
            return;
        }


        GameManager.me.uiManager.popupEvolution.show(Rune.Type.Unit, data.serverId, (isFromInventorySlot)?WSDefine.NO:WSDefine.YES);
    }
示例#12
0
 public static void checkLevelupPopupWithoutCallback(PopupData.PopupAction popupAction = null)
 {
     if (needLevelupPopup)
     {
         needLevelupPopup = false;
         UISystemPopup.open(UISystemPopup.PopupType.LevelUp, GameDataManager.instance.level + "", popupAction, popupAction);
     }
 }
示例#13
0
    void onSelect(GameObject go)
    {
        P_Product p = GameManager.me.uiManager.popupShop.popupGift.selectedGiftItem;

        UISystemPopup.open(UISystemPopup.PopupType.YesNoPrice,
                           Util.getUIText("CONFIRM_SENDGIFT", p.count.ToString(), epi.GAME_DATA.appFriendDic[data.userId].f_Nick),
                           onConfirmToSendGift, null, p.price.ToString(), p.priceType);
    }
示例#14
0
    void onClickCompose(GameObject go)
    {
        if (btnClose.gameObject.activeSelf == false)
        {
            return;
        }

        if (popupType == RuneInfoPopup.Type.Reinforce && RuneStudioMain.instance.step != RuneStudioMain.Step.Finish)
        {
            Debug.Log("wait...");
            return;
        }

        if (data.rare >= RareType.S)
        {
            UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("COMPOSE_NOMORE"));
            return;
        }
        else if (data.reinforceLevel < GameIDData.MAX_LEVEL)
        {
            UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("COMPOSE_LEVELLIMIT"));
            return;
        }
        else
        {
            int composeSourceNumber = 0;

            for (int i = 0; i < GameDataManager.instance.partsInventoryList.Count; ++i)
            {
                if (GameDataManager.instance.partsInventoryList[i].rare == data.rare &&
                    GameDataManager.instance.partsInventoryList[i].reinforceLevel == GameIDData.MAX_LEVEL)
                {
                    ++composeSourceNumber;
                    if (composeSourceNumber > 2)
                    {
                        break;
                    }
                }
            }

            if (isFromInventorySlot)
            {
                --composeSourceNumber;
            }

            if (composeSourceNumber <= 0)
            {
                UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("NO_COMPOSE_EQUIP", RareType.CHARACTER[data.rare]));
                return;
            }
        }


        hide();

        GameManager.me.uiManager.uiMenu.uiHero.startComposeMode(GameIDData.getClone(data), isFromInventorySlot);
    }
示例#15
0
    public static bool checkRubyPopup(int ruby)
    {
        if (GameDataManager.instance.ruby < ruby)
        {
            UISystemPopup.open(UISystemPopup.PopupType.GoToRubyShop);
            return(false);
        }

        return(true);
    }
示例#16
0
 public void onClickBreak(GameObject go)
 {
     if (btnClose.gameObject.activeSelf == false)
     {
         return;
     }
     UISystemPopup.open(UISystemPopup.PopupType.Sell,
                        Util.getUIText("MSG_SELL_UNITRUNE", RareType.WORD[data.rare], data.unitData.name, data.getSellPrice().ToString()),
                        onConfirmBreak, null, data.serverId);
 }
示例#17
0
 void OnDestroy()
 {
     uiPlay        = null;
     uiMenu        = null;
     uiTitle       = null;
     uiLoading     = null;
     uiSystemPopup = null;
     popupPaused   = null;
     instance      = null;
 }
示例#18
0
    void Awake()
    {
        if (instance != null)
        {
            GameObject.Destroy(instance.gameObject);
        }

        spBackground.gameObject.SetActive(true);
        instance = this;
    }
示例#19
0
 public void onCompleteReceiveCouponUrl(string url)
 {
     if (string.IsNullOrEmpty(url) == false)
     {
         PandoraManager.instance.showWebView(url, onCloseCouponPage);
     }
     else
     {
         UISystemPopup.open(Util.getUIText("COUPON_URL_ERR"));
     }
 }
示例#20
0
    public void checkReplayResult(bool replayResultIsMyWinning)
    {
        if (GameManager.me.uiManager.uiPlay.btnReplayClose.gameObject.activeSelf == false && GameManager.me.isStartGame == false)
        {
            return;
        }

        if (isPVPReplayIsSurrenderGame)
        {
            if (replayResultIsMyWinning)
            {
                UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("REPLAY_SURREND"), playReplayResultAsWin);
            }
            else
            {
                UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("REPLAY_SURREND"), playReplayResultAsLose);
            }

            return;
        }

        if (needReplayResultCheck)
        {
            // 공격게임.
            if (isPVPReplayIsAttackGame)
            {
                // 공격자가 이기면 나도 이겨야함.
                if (isPVPReplayIsAttackerWinGame == true && replayResultIsMyWinning == false)
                {
                    UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("REPLAY_ERROR", Util.getUIText("WIN")), playReplayResultAsWin);
                }
                // 공격자가 지면 나도 져야함.
                else if (isPVPReplayIsAttackerWinGame == false && replayResultIsMyWinning == true)
                {
                    UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("REPLAY_ERROR", Util.getUIText("LOSE")), playReplayResultAsLose);
                }
            }
            else             // 방어게임
            {
                // 공격자가 이기면 나는 저야함.
                if (isPVPReplayIsAttackerWinGame == true && replayResultIsMyWinning == true)
                {
                    UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("REPLAY_ERROR", Util.getUIText("WIN")), playReplayResultAsLose);
                }
                // 공격자가 지면 나는 이겨야함.
                else if (isPVPReplayIsAttackerWinGame == false && replayResultIsMyWinning == false)
                {
                    UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("REPLAY_ERROR", Util.getUIText("LOSE")), playReplayResultAsWin);
                }
            }
        }

        GameManager.me.playReplayResult(replayResultIsMyWinning);
    }
 void onBuyChloe()
 {
     if (GameDataManager.instance.ruby < GameDataManager.instance.heroPrices[Character.CHLOE])
     {
         UISystemPopup.open(UISystemPopup.PopupType.GoToRubyShop);
     }
     else
     {
         EpiServer.instance.sendBuyHero(Character.CHLOE, GameIDData.Type.None);
     }
 }
示例#22
0
 void checkAdvice()
 {
     UISystemPopup.open(UISystemPopup.PopupType.Advice, "", checkAdvice, checkAdvice, _tempIndex);
     if (_tempIndex == 0)
     {
         _tempIndex = 1;
     }
     else
     {
         _tempIndex = 0;
     }
 }
示例#23
0
 void onBuyChloe()
 {
     if (GameDataManager.instance.ruby < GameDataManager.instance.heroPrices[Character.CHLOE])
     {
         UISystemPopup.open(UISystemPopup.PopupType.GoToRubyShop);
     }
     else
     {
         _buyHero = Character.CHLOE;
         EpiServer.instance.sendBuyHero(_buyHero, tabType);
     }
 }
示例#24
0
    IEnumerator startEndEffect()
    {
        int index = 0;

        while (true)
        {
            goOnEffectBorderContainer.SetActive(index % 2 == 0);
            ++index;
            if (index > 6)
            {
                break;
            }
            yield return(Util.ws01);
        }

        isReady = true;

        GameManager.soundManager.stopLoopEffect();

        SoundData.play("uifr_bonusstop");

        GameManager.me.uiManager.uiMenu.uiFriend.btnReceiveBonus.isEnabled = (GameDataManager.instance.friendPoint >= GameDataManager.instance.slotMachinePrice);

        if (TutorialManager.instance.isTutorialMode == false)
        {
            UISystemPopup.checkLevelupPopupWithoutCallback();
        }

        GameManager.me.uiManager.uiMenu.uiFriend.btnBack.isEnabled   = true;
        GameManager.me.uiManager.uiMenu.uiFriend.btnInvite.isEnabled = true;

        GameManager.me.uiManager.uiMenu.uiFriend.lbSlotMachinePrice.text = Util.GetCommaScore(GameDataManager.instance.slotMachinePrice);

        if (receiveReward.code == WSDefine.REWARD_TYPE_ITEM || receiveReward.code == WSDefine.REWARD_TYPE_GACHA)
        {
            RuneStudioMain.instance.playMakeResult(new string[] { receiveReward.itemId }, false);
        }
        else if (receiveReward.code == WSDefine.REWARD_TYPE_RUNE)
        {
            RuneStudioMain.instance.playMakeResult(new string[] { slotMachinePacketInfo.rewardItem }, false);
        }
        else
        {
            GameManager.me.uiManager.rewardNotice.start(true, receiveReward);
        }

        if (TutorialManager.nowPlayingTutorial("T15", 4))
        {
            TutorialManager.instance.subStep = 6;
            EpiServer.instance.sendCompleteTutorial("T15");
        }
    }
 void onClickChloe(GameObject go)
 {
     if (GameDataManager.instance.heroes.ContainsKey(Character.CHLOE))
     {
         SoundData.play("uihe_changehero");
         setCharacter(Character.CHLOE);
         //EpiServer.instance.sendChangeHero(Character.CHLOE, true) ;
     }
     else
     {
         UISystemPopup.open(UISystemPopup.PopupType.YesNoPrice, Util.getUIText("BUY_HERO", Util.getUIText("CHLOE")), onBuyChloe, null, GameDataManager.instance.heroPrices[Character.CHLOE].ToString());
     }
 }
示例#26
0
    void onClickNotice(GameObject go)
    {
        if (PandoraManager.instance.localUser.messageBlock && cbPushNotice.value == true)
        {
            UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("CHECK_MSG_ALLOW"));
            setMessageBlock(true);
            return;
        }

        Debug.LogError(cbPushNotice.value);
        GameDataManager.instance.messageBlock = (cbPushNotice.value?WSDefine.NO:WSDefine.YES);
        EpiServer.instance.sendSetSetting();
    }
    public void showGiftShop()
    {
                #if UNITY_IOS
        if (GameManager.me.isGuest && GameDataManager.instance.serviceMode != GameDataManager.ServiceMode.IOS_SUMMIT)
        {
            UISystemPopup.open("게스트 모드일 때는 루비구매를 하실 수 없습니다.");
            return;
        }
                #endif

        show();
        onClickGift(null);
    }
    void onClickReplay(GameObject go)
    {
#if UNITY_IPHONE
        UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("REPLAY_TEMPPOPUP"), onClickReplay2);
#else
        bool isAttackGame = true;
        if (GameManager.me.uiManager.popupChampionshipReplayPanel.tabKind == 1)
        {
            isAttackGame = false;
        }

        EpiServer.instance.sendGetReplay(isAttackGame, GameManager.me.uiManager.popupChampionshipReplayPanel.data.userId, "R" + index.ToString());
#endif
    }
示例#29
0
    public void onClickEvent(GameObject go)
    {
        if (GameManager.me.uiManager.popupSummonDetail.gameObject.activeSelf)
        {
            return;
        }

        if (string.IsNullOrEmpty(GameDataManager.instance.eventUrl))
        {
            UISystemPopup.open("현재 준비된 이벤트가 없습니다.");
        }

        PandoraManager.instance.showWebView(GameDataManager.instance.eventUrl, onCloseEventPage);
    }
    public void onStartRound(GameObject go)
    {
        if (GameManager.me.uiManager.uiLoading.gameObject.activeSelf)
        {
            return;
        }

#if UNITY_EDITOR
        if (DebugManager.instance.useDebug)
        {
            GameManager.me.startGame(0.5f);
        }
        else
#endif
        {
            if (selectSigongData.priceType == WSDefine.ENERGY)
            {
                if (GameDataManager.instance.energy < selectSigongData.price)
                {
                    UISystemPopup.open(UISystemPopup.PopupType.YesNo, Util.getUIText("GO_TO_ENERGYSHOP"), GameManager.me.uiManager.popupShop.showEnergyShop);
                    return;
                }
            }
            else if (selectSigongData.priceType == WSDefine.GOLD)
            {
                if (GameDataManager.instance.gold < selectSigongData.price)
                {
                    UISystemPopup.open(UISystemPopup.PopupType.YesNo, Util.getUIText("GOTO_GOLD_SHOP"), GameManager.me.uiManager.popupShop.showGoldShop);
                    return;
                }
            }
            else if (selectSigongData.priceType == WSDefine.RUBY)
            {
                if (GameDataManager.instance.ruby < selectSigongData.price)
                {
                    UISystemPopup.open(UISystemPopup.PopupType.YesNo, Util.getUIText("GOTO_RUBY_SHOP"), GameManager.me.uiManager.popupShop.showRubyShop);
                    return;
                }
            }

            if (selectSigongData.forcedDeck != null && selectSigongData.forcedDeck == "HERO_SELECT")
            {
                popupSelectHero.show();
            }
            else
            {
                EpiServer.instance.sendPlaySigong(selectSigongData.id);
            }
        }
    }