Ejemplo n.º 1
0
        public void ChangeToCarFightScene(PassItem passData)
        {
            BaseScene scene     = new FightScene(passData);
            FrameCtrl frameCtrl = new FightFrameCtrl(scene);

            ChangeCtrl(frameCtrl);
        }
Ejemplo n.º 2
0
        public void ChangeToCampsiteFightScene(int levelId)
        {
            Debug.Log("Enter Camp Fight " + levelId);
            var levelRes = TableMgr.singleton.LevelTable.GetItemByID(levelId);

            if (levelRes == null)
            {
                return;
            }
            int      passId   = levelRes.passID;
            PassItem passData = Global.gApp.gGameData.PassData.Get(passId);

            if (passData == null)
            {
                return;
            }
            Application.targetFrameRate = 30;
            Global.gApp.gMsgDispatcher.Cleanup();
            TipsMgr.singleton.Clear();
            PlayerDataMgr.singleton.SetStageParam(levelId, true);
            //SceneManager.LoadScene(passData.scene);
            var op = SceneManager.LoadSceneAsync(passData.scene);

            op.completed += (a) =>
            {
                Debug.Log("ChangeToCampsiteFightScene");
                BaseScene scene     = new CampsiteFightScene(levelId, passData);
                FrameCtrl frameCtrl = new FightFrameCtrl(scene);
                ChangeCtrl(frameCtrl);
            };
        }