AxiosEngine-old 

AxiosEngine-old Commit Details


Date:2012-06-03 16:58:00 (12 years 6 months ago)
Author:Natalie Adams
Branch:default
Commit:db1caed4b78a
Parents: 646318719561
Message:Adding tcc command to AxiosCommandConsole to toggle the ability to control

the camera using the arrow keys
Adding the ability to disable commands in XNACC from AxiosCommandConsole
Changes:
Maxios/Axios_settings.cs (1 diff)
Maxios/Engine/AxiosCommandConsole.cs (3 diffs)
Maxios/Engine/AxiosGameScreen.cs (1 diff)
Maxios/XNACC/CommandConsoleBase.cs (1 diff)

File differences

axios/Axios_settings.cs
9999
100100
101101
102
102103
103104
104105
* - Changing variables in CommandConsoleBase to be non-static
* - Adding rotation to DrawableAxiosGameObject
* - Adding InputState extensions to test for input agaisnt Player One
* - Adding the ability to disable commands in XNACC from AxiosCommandConsole
*
*
*/
axios/Engine/AxiosCommandConsole.cs
2424
2525
2626
27
2728
2829
2930
......
5455
5556
5657
58
59
60
61
62
5763
5864
5965
66
6067
68
6169
6270
6371
6472
73
74
75
76
77
78
6579
6680
6781
......
7791
7892
7993
94
8095
8196
8297
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
axios/Engine/AxiosGameScreen.cs
207207
208208
209209
210
211
212
213
214
215
210216
211217
212218
}
#endif
camera = new Camera(ScreenManager.GraphicsDevice.Viewport.Width, ScreenManager.GraphicsDevice.Viewport.Height);
#if DEBUG
EnableCameraControl = true;
#else
EnableCameraControl = false;
#endif
}
public override void Draw(GameTime gameTime)
axios/XNACC/CommandConsoleBase.cs
23102310
23112311
23122312
2313
2314
23132315
23142316
23152317
23162318
23172319
23182320
2321
23192322
23202323
23212324
{
stringcvarName = cmdLine[ 1 ].ToLowerInvariant();
// Isn't this preventing us from modifying a cvar?
// -- Nathan Adams [adamsna@datanethost.net] - 6/3/2012
if( m_cVars.TryGetValue( cvarName, out cvar ) )
{
AddErrorToLog( "CVar " + cmdLine[ 1 ] +
" already exists with a value of: " + cvar.Value ?? "(null" );
return;
}
if( cmdLine.Length == 4 )
{
stringtypeName = cmdLine[ 2 ];

Archive Download the corresponding diff file

Page rendered in 0.42804s using 14 queries.