Example #1
0
    public override void buttonEventBase(GameObject gameObj)
    {
        base.buttonEventBase(gameObj);

        if (gameObj.name == "evolutionButton")
        {
            clearAudio();
            UiManager.Instance.openWindow <BeastSummonShowWindow>((win) => {
                win.Initialize(selectedEvolve, oldExp);
            });
        }
        else if (gameObj.name == "summonButton")          //召唤
        {
            if (needPropNum > UserManager.Instance.self.merit)
            {
                UiManager.Instance.createMessageLintWindow(Language("beastAttrError_01"));
                MaskWindow.UnlockUI();
                return;
            }
            clearAudio();
            if (GuideManager.Instance.isEqualStep(16004000))
            {
                GuideManager.Instance.doGuide();
            }
            beastSummonButton.disableButton(true);
            BeastSummonFPort fport = FPortManager.Instance.getFPort("BeastSummonFPort") as BeastSummonFPort;
            fport.access(sample.sid, summonBack);
        }
        else if (gameObj.name == "otherButton")
        {
            clearAudio();
            if (GuideManager.Instance.isEqualStep(17004000))
            {
                GuideManager.Instance.doGuide();
            }
            if (fatherWindow is TeamEditWindow)
            {
                (fatherWindow as TeamEditWindow).updateBeastButton(selectedCard);
            }
            if (fatherWindow is CardSelectWindow)
            {
                AttackBossOneOnOneManager.Instance.choosedBeast = selectedCard;
                (fatherWindow as CardSelectWindow).updateUI(selectedCard);
            }
            finishWindow();
        }
        else if (gameObj.name == "close")
        {
            clearAudio();
            finishWindow();
            EventDelegate.Add(OnHide, () => {
                if (fatherWindow is TeamEditWindow)
                {
                    (fatherWindow as TeamEditWindow).reLoadTeam();
                }
            });
        }
        else if (gameObj.name == "conditionButton")
        {
            if (sample == null)
            {
                MaskWindow.UnlockUI();
                return;
            }
            UiManager.Instance.openDialogWindow <ConditionsWindow> ((win) => {
                win.Initialize(selectedEvolve);
            });
        }
    }
Example #2
0
    //召唤 召唤兽 传 兑换id
    private void summon()
    {
        BeastSummonFPort fport = FPortManager.Instance.getFPort("BeastSummonFPort") as BeastSummonFPort;

        fport.access(sample.sid, summonBack);
    }