//------------------------------------------------------------------------------------------------------- // 游戏退出时使用 public void Release() { if (m_LuaSystem != null) // Lua系统 { m_LuaSystem.Release(); m_LuaSystem = null; } if (m_SkillSys != null) { m_SkillSys.Release(); m_SkillSys = null; } if (m_EntitySys != null) // 实体系统 { m_EntitySys.Release(); m_EntitySys = null; } // 技能系统 if (m_ControllerSys != null) // 控制器系统 { m_ControllerSys.Release(); m_ControllerSys = null; } if (m_MapSystem != null) // 地图系统 { m_MapSystem.Release(); m_MapSystem = null; } // 游戏设置 if (m_GameOption != null) { GameOption op = m_GameOption as GameOption; if (op != null) { op.Close(); } } }
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; }