コード例 #1
0
ファイル: PVESettleSys.cs プロジェクト: TonyDongGuaPi/joework
        private void GotoNextLevel(CUIEvent uiEvent)
        {
            this.CloseItemForm();
            SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

            if (curLvelContext != null && curLvelContext.IsGameTypeAdventure())
            {
                int nextLevelId = CAdventureSys.GetNextLevelId(curLvelContext.m_chapterNo, (int)curLvelContext.m_levelNo, curLvelContext.m_levelDifficulty);
                if (nextLevelId != 0)
                {
                    CUIEvent cUIEvent = new CUIEvent();
                    cUIEvent.m_eventID         = enUIEventID.Adv_OpenLevelForm;
                    cUIEvent.m_eventParams.tag = nextLevelId;
                    Singleton <CUIEventManager> .GetInstance().DispatchUIEvent(cUIEvent);
                }
            }
            else if (curLvelContext != null && curLvelContext.IsGameTypeActivity())
            {
                Singleton <CUIEventManager> .GetInstance().DispatchUIEvent(enUIEventID.Explore_OpenForm);
            }
        }
コード例 #2
0
ファイル: PVESettleSys.cs プロジェクト: wujiangu/wanshiwu0.1
        private void GotoNextLevel(CUIEvent uiEvent)
        {
            this.CloseItemForm();
            SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

            if ((curLvelContext != null) && (curLvelContext.GameType == COM_GAME_TYPE.COM_SINGLE_GAME_OF_ADVENTURE))
            {
                int num = CAdventureSys.GetNextLevelId(curLvelContext.iChapterNo, curLvelContext.bLevelNo, curLvelContext.difficulty);
                if (num != 0)
                {
                    CUIEvent event2 = new CUIEvent {
                        m_eventID = enUIEventID.Adv_OpenLevelForm
                    };
                    event2.m_eventParams.tag = num;
                    Singleton <CUIEventManager> .GetInstance().DispatchUIEvent(event2);
                }
            }
            else if ((curLvelContext != null) && (curLvelContext.GameType == COM_GAME_TYPE.COM_SINGLE_GAME_OF_ACTIVITY))
            {
                Singleton <CUIEventManager> .GetInstance().DispatchUIEvent(enUIEventID.Explore_OpenForm);
            }
        }
コード例 #3
0
        public static void SetRewardFormData(CUIFormScript form, COMDT_SETTLE_RESULT_DETAIL settleData)
        {
            Singleton <CUIManager> .GetInstance().LoadUIScenePrefab(CUIUtility.s_heroSceneBgPath, form);

            SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

            if (curLvelContext == null)
            {
                return;
            }
            GameObject gameObject = form.transform.Find("Root/Panel_Interactable/Button_Next").gameObject;

            if (curLvelContext.IsGameTypeActivity())
            {
                gameObject.CustomSetActive(false);
            }
            else
            {
                int nextLevelId = CAdventureSys.GetNextLevelId(curLvelContext.m_chapterNo, (int)curLvelContext.m_levelNo, curLvelContext.m_levelDifficulty);
                if (nextLevelId != 0)
                {
                    if (Singleton <CAdventureSys> .GetInstance().IsLevelOpen(nextLevelId))
                    {
                        gameObject.CustomSetActive(true);
                    }
                    else
                    {
                        gameObject.CustomSetActive(false);
                    }
                }
                else
                {
                    gameObject.CustomSetActive(false);
                }
            }
            gameObject.CustomSetActive(false);
            PVESettleView.Show3DModel(form);
            GameObject gameObject2 = form.transform.Find("Root/Panel_Award/Award/Panel_GuanKa/GuanKaDifficulty1").gameObject;
            GameObject gameObject3 = form.transform.Find("Root/Panel_Award/Award/Panel_GuanKa/GuanKaDifficulty2").gameObject;
            GameObject gameObject4 = form.transform.Find("Root/Panel_Award/Award/Panel_GuanKa/GuanKaDifficulty3").gameObject;
            Text       component   = form.transform.Find("Root/Panel_Award/Award/Panel_GuanKa/GuanKaName").gameObject.GetComponent <Text>();

            if (curLvelContext.m_levelDifficulty == 1)
            {
                gameObject3.CustomSetActive(false);
                gameObject4.CustomSetActive(false);
            }
            else if (curLvelContext.m_levelDifficulty == 2)
            {
                gameObject2.CustomSetActive(false);
                gameObject4.CustomSetActive(false);
            }
            else if (curLvelContext.m_levelDifficulty == 3)
            {
                gameObject3.CustomSetActive(false);
                gameObject2.CustomSetActive(false);
            }
            component.text = string.Format(curLvelContext.m_levelName, new object[0]);
            PVESettleView._continueBtn1 = form.transform.Find("Root/Panel_Interactable/Button_Once").gameObject;
            PVESettleView._continueBtn2 = form.transform.Find("Root/Panel_Interactable/Button_ReturnLobby").gameObject;
            PVESettleView._continueBtn1.CustomSetActive(true);
            PVESettleView._continueBtn2.CustomSetActive(true);
            PVESettleView.ShowReward(form, settleData);
            CUICommonSystem.PlayAnimator(form.gameObject, "Box_Show_2");
        }