private void DoBeginLevel() { if (Singleton <LevelScoreManager> .Instance == null) { Singleton <LevelScoreManager> .Create(); } LevelScoreManager instance = Singleton <LevelScoreManager> .Instance; Transform transform = base.view.transform.Find("LevelDebugPanel"); if (transform != null) { instance.isDebugDynamicLevel = transform.GetComponent <MonoLevelDebug>().useDynamicLevel; } instance.collectAntiCheatData = this._stageBeginRsp.get_is_collect_cheat_data(); instance.signKey = this._stageBeginRsp.get_sign_key(); int progress = !this._stageBeginRsp.get_progressSpecified() ? 0 : ((int)this._stageBeginRsp.get_progress()); LevelDataItem level = !this._stageBeginRsp.get_stage_idSpecified() ? this.level : Singleton <LevelModule> .Instance.GetLevelById((int)this._stageBeginRsp.get_stage_id()); instance.SetLevelBeginIntent(level, progress, this._stageBeginRsp.get_drop_item_list(), this.level.BattleType, this._helperDetailData); this.ResetWaitPacketData(); Singleton <MainUIManager> .Instance.PopTopPageOnly(); ChapterSelectPageContext currentPageContext = Singleton <MainUIManager> .Instance.CurrentPageContext as ChapterSelectPageContext; if (currentPageContext != null) { currentPageContext.OnDoLevelBegin(); } bool toKeepContextStack = Singleton <MainUIManager> .Instance.SceneCanvas is MonoMainCanvas; Singleton <MainUIManager> .Instance.MoveToNextScene("TestLevel01", toKeepContextStack, true, true, null, true); }
public void OnClickLevelButton() { Singleton <LevelScoreManager> .Create(); Singleton <LevelScoreManager> .Instance.SetDebugLevelBeginIntent(this.luaName); Singleton <MainUIManager> .Instance.CurrentPageContext.BackPage(); ChapterSelectPageContext currentPageContext = Singleton <MainUIManager> .Instance.CurrentPageContext as ChapterSelectPageContext; if (currentPageContext != null) { currentPageContext.OnDoLevelBegin(); } Singleton <MainUIManager> .Instance.MoveToNextScene("TestLevel01", true, true, true, null, true); }