public GameEngine(IEditor editor = null, bool _enableUDPConsole = true, bool _passiveMode = false) { // Only create essential variables here // debug and console m_passiveMode = _passiveMode; m_console = new CatConsole(); if (_enableUDPConsole) { m_updConsolePanel = new UDPConsolePanel(m_console); m_updConsolePanel.Start(); } // set game mode _editor = editor; if (editor != null) { _gameEngineMode = GameEngineMode.MapEditor; _gameInEditorMode = InEditorMode.Editing; } else { _gameEngineMode = GameEngineMode.InGame; } // graphics device InitGraphicsDevice(); }
public void LoadConsoleCommands(string libPath) { string[] files = Directory.GetFiles(libPath, "*.dll"); foreach (string file in files) { Assembly assembly = Assembly.LoadFrom(file); CatConsole.SearchInAssembly(assembly, consoleCommands); } }
public void Update() { while (m_inputMsg.Count > 0) { String str = m_inputMsg.Dequeue() as String; IConsoleCommand commend = CatConsole.IntepreteCommendString(str); if (commend != null) { m_console.PushCommend(commend, this); } } }
public UDPConsolePanel(CatConsole _console) { m_console = _console; }