You are looking at an old revision of the page AxiosCommandConsole. This revision was created by Natalie Adams.
Table of Contents
Info about Axios Command Console
AxiosCommandConsole
AxiosCommandConsole is a sample class to make XNACC easy to use with Axios.
Windows
The CommandConsole won't work on WP7/Xbox 360 (currently, this may change in the future) and thus require #if WINDOWS if you are developing crossplatform games. The following is an example of how to get it into your game.
Sample code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #if WINDOWS class GameConsole : AxiosCommandConsole { public GameConsole(AxiosGameScreen gameScreen) : base (gameScreen) { } protected override void LoadContent() { LoadDefault(); base .LoadContent(); } } #endif |
1 2 3 4 | #if WINDOWS GameConsole c = new GameConsole( this ); AddGameObject(c); #endif |
Restricting commands
Inside of the constructor add whatever commands you want to remove to the RestrictedCommands list. Example:
1 2 3 4 5 | public GameConsole(AxiosGameScreen gameScreen) : base (gameScreen) { RestrictedCommands.AddRange( new string [] { "help" }); } |