Adding AxiosCommandConsole for easy intergration with AxiosGameScreens

Adding the ability to get the InputState object from the ScreenManager

--HG--
branch : xnacc-integration
This commit is contained in:
Nathan Adams 2012-05-26 18:50:49 -05:00
parent e9e97dae39
commit 13857f324d
5 changed files with 34 additions and 0 deletions

View File

@ -155,6 +155,7 @@
<Compile Include="Dynamics\TimeStep.cs" /> <Compile Include="Dynamics\TimeStep.cs" />
<Compile Include="Dynamics\World.cs" /> <Compile Include="Dynamics\World.cs" />
<Compile Include="Dynamics\WorldCallbacks.cs" /> <Compile Include="Dynamics\WorldCallbacks.cs" />
<Compile Include="Engine\AxiosCommandConsole.cs" />
<Compile Include="Engine\AxiosEvents.cs" /> <Compile Include="Engine\AxiosEvents.cs" />
<Compile Include="Engine\AxiosGameObject.cs" /> <Compile Include="Engine\AxiosGameObject.cs" />
<Compile Include="Engine\AxiosGameScreen.cs" /> <Compile Include="Engine\AxiosGameScreen.cs" />

View File

@ -98,6 +98,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Engine\AxiosBreakableGameObject.cs" /> <Compile Include="Engine\AxiosBreakableGameObject.cs" />
<Compile Include="Engine\AxiosCommandConsole.cs" />
<Compile Include="Engine\AxiosEvents.cs" /> <Compile Include="Engine\AxiosEvents.cs" />
<Compile Include="Axios_settings.cs" /> <Compile Include="Axios_settings.cs" />
<Compile Include="Collision\Collision.cs" /> <Compile Include="Collision\Collision.cs" />

View File

@ -149,6 +149,7 @@
<Compile Include="Dynamics\World.cs" /> <Compile Include="Dynamics\World.cs" />
<Compile Include="Dynamics\WorldCallbacks.cs" /> <Compile Include="Dynamics\WorldCallbacks.cs" />
<Compile Include="Engine\AxiosBreakableGameObject.cs" /> <Compile Include="Engine\AxiosBreakableGameObject.cs" />
<Compile Include="Engine\AxiosCommandConsole.cs" />
<Compile Include="Engine\AxiosEvents.cs" /> <Compile Include="Engine\AxiosEvents.cs" />
<Compile Include="Engine\AxiosGameObject.cs" /> <Compile Include="Engine\AxiosGameObject.cs" />
<Compile Include="Engine\AxiosGameScreen.cs" /> <Compile Include="Engine\AxiosGameScreen.cs" />

View File

@ -0,0 +1,26 @@
#if WINDOWS
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XNACC.Console;
using Microsoft.Xna.Framework.Graphics;
namespace Axios.Engine
{
class AxiosCommandConsole : CommandConsoleBase
{
public AxiosCommandConsole(AxiosGameScreen gameScreen)
: base(gameScreen.ScreenManager.Game)
{
Keyboard = gameScreen.ScreenManager.InputState;
}
public AxiosCommandConsole(AxiosGameScreen gameScreen, SpriteFont font)
: base(gameScreen.ScreenManager.Game, font)
{
Keyboard = gameScreen.ScreenManager.InputState;
}
}
}
#endif

View File

@ -57,6 +57,11 @@ namespace GameStateManagement
#region Properties #region Properties
public InputState InputState
{
get { return input; }
private set { input = value; }
}
public SpriteFonts Fonts public SpriteFonts Fonts
{ {