Exemplo n.º 1
0
        private IGameOption m_GameOption          = null; // 游戏设置



        //private float startTime = 0;

        /**
         * @brief
         * @param bEditor 编辑器使用
         */
        public void Init(bool bEditor = false)
        {
            if (m_LuaSystem == null)
            {
                //m_LuaSystem = LuaSystemCreator.CreateLuaSystem();
            }
            // 实体系统
            if (m_EntitySys == null)
            {
                m_EntitySys = EntitySystemCreator.CreateEntitySystem(this);
                m_EntitySys.Create();
            }

            if (m_SkillSys == null)
            {
                m_SkillSys = SkillSystemCreator.CreateSkillSystem(this);
                m_SkillSys.Init(bEditor);
            }
            if (m_MapSystem == null)
            {
                m_MapSystem = MapSystemCreator.CreateMapSystem(this, bEditor);
            }
            // 控制器
            if (m_ControllerSys == null)
            {
                m_ControllerSys = ControllerSystemCreator.CreateControllerSystem(this);
                m_ControllerSys.ActiveController(ControllerType.ControllerType_KeyBoard);
            }

            if (m_GameOption == null)
            {
                GameOption op = new GameOption();
                op.Create();
                m_GameOption = op;

                // 应用设置
                //op.ApplyOption();
            }
            //startTime = 0;
        }