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:
parent
e9e97dae39
commit
13857f324d
@ -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" />
|
||||||
|
@ -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" />
|
||||||
|
@ -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" />
|
||||||
|
26
axios/Engine/AxiosCommandConsole.cs
Normal file
26
axios/Engine/AxiosCommandConsole.cs
Normal 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
|
@ -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
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user