| public class AxiosCommandConsole : CommandConsoleBase␍␊ |
| {␍␊ |
| protected AxiosGameScreen GameScreen;␍␊ |
| protected List<string> RestrictedCommands = new List<string>();␍␊ |
| public AxiosCommandConsole(AxiosGameScreen gameScreen)␍␊ |
| : base(gameScreen.ScreenManager.Game)␍␊ |
| {␍␊ |
|
| AddOutputToLog("============");␍␊ |
| }␍␊ |
| ␍␊ |
| public void ToggleCamera()␍␊ |
| {␍␊ |
| GameScreen.EnableCameraControl = !GameScreen.EnableCameraControl;␍␊ |
| }␍␊ |
| ␍␊ |
| public override void InitializeCustomCommands()␍␊ |
| {␍␊ |
| AddCommand(new CmdObject("axioslog", "Displays the current Axios Log", input => { ShowAxiosLog(); }));␍␊ |
| AddCommand(new CmdObject("tcc", "Toggles user camera control", input => { ToggleCamera(); }));␍␊ |
| base.InitializeCustomCommands();␍␊ |
| ␍␊ |
| }␍␊ |
| public override void LoadContent(ContentManager content)␍␊ |
| {␍␊ |
| base.LoadContent(content);␍␊ |
| ␍␊ |
| foreach (string cmd in RestrictedCommands)␍␊ |
| {␍␊ |
| if (ms_commands.Keys.Contains(cmd))␍␊ |
| ms_commands.Remove(cmd);␍␊ |
| }␍␊ |
| }␍␊ |
| ␍␊ |
| protected override void LoadContent()␍␊ |
|
| base.UnloadContent();␍␊ |
| //ms_commands.Remove("axioslog");␍␊ |
| }␍␊ |
| ␍␊ |
| }␍␊ |
| }␍␊ |
| #else␍␊ |