Changing variables in CommandConsoleBase to be non-static
This commit is contained in:
@@ -23,18 +23,18 @@ namespace Axios.Engine
|
||||
{
|
||||
public class AxiosCommandConsole : CommandConsoleBase
|
||||
{
|
||||
//private AxiosGameScreen _gameScreen;
|
||||
protected AxiosGameScreen GameScreen;
|
||||
public AxiosCommandConsole(AxiosGameScreen gameScreen)
|
||||
: base(gameScreen.ScreenManager.Game)
|
||||
{
|
||||
//_gameScreen = gameScreen;
|
||||
GameScreen = gameScreen;
|
||||
Keyboard = gameScreen.ScreenManager.InputState;
|
||||
}
|
||||
|
||||
public AxiosCommandConsole(AxiosGameScreen gameScreen, SpriteFont font)
|
||||
: base(gameScreen.ScreenManager.Game, font)
|
||||
{
|
||||
//_gameScreen = gameScreen;
|
||||
GameScreen = gameScreen;
|
||||
Keyboard = gameScreen.ScreenManager.InputState;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace Axios.Engine
|
||||
protected override void UnloadContent()
|
||||
{
|
||||
base.UnloadContent();
|
||||
ms_commands.Remove("axioslog");
|
||||
//ms_commands.Remove("axioslog");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -391,7 +391,7 @@ namespace Axios.Engine
|
||||
public override void HandleInput(GameTime gameTime, InputState input)
|
||||
{
|
||||
#if WINDOWS
|
||||
if (_console == null || !_console.Active || (AllowKeyboardWhileConsoleIsActive && _console.Active) )
|
||||
if (_console == null || !AxiosCommandConsole.Active || (AllowKeyboardWhileConsoleIsActive && AxiosCommandConsole.Active))
|
||||
#endif
|
||||
{
|
||||
base.HandleInput(gameTime, input);
|
||||
@@ -429,6 +429,7 @@ namespace Axios.Engine
|
||||
#if WINDOWS
|
||||
if (_console != null)
|
||||
{
|
||||
//System.Diagnostics.Debugger.Break();
|
||||
ScreenManager.Game.Components.Remove(_console);
|
||||
_console.Dispose();
|
||||
_console = null;
|
||||
|
Reference in New Issue
Block a user