Esempio n. 1
0
        private void OnLoadSceneDone(CommandBase obj)
        {
            //出事化战斗场景数据
            Cmd_LoadScene cmdScene = obj as Cmd_LoadScene;

            BattleScene.Instance.Init(cmdScene.sceneId);
        }
Esempio n. 2
0
        protected override void OnEnter()
        {
            BattleInfo.Clear();
            BattleInfo.userId = 1;
            GameObjectPool.Instance.Clear();
            ViewSys.Instance.Open("LoadingView");
            m_cJoinSequence = new CommandSequence();
            var cmdConnectBattleServer = new Cmd_ConnectBattleServer();
            var cmdLoadScene           = new Cmd_LoadScene();

            cmdLoadScene.On_Done += OnLoadSceneDone;
            m_cJoinSequence.AddSubCommand(cmdConnectBattleServer);
            m_cJoinSequence.AddSubCommand(cmdLoadScene);
            m_cJoinSequence.On_Done += OnJoinScene;
            GameInContext context = new GameInContext();

            context.sceneId = GameConst.Instance.GetInt("default_scene_id");
            m_cJoinSequence.Execute(context);
        }