Changing variables in CommandConsoleBase to be non-static
This commit is contained in:
parent
ff32d18553
commit
14cbefc6ef
@ -96,6 +96,7 @@
|
|||||||
* - Adding IsNullOrWhiteSpace extension for support for Xbox 360
|
* - Adding IsNullOrWhiteSpace extension for support for Xbox 360
|
||||||
* - Upon some testing - developers will need to use #if WINDOWS/#endif tags to make sure they can't use XNACC in WP7/Xbox360
|
* - Upon some testing - developers will need to use #if WINDOWS/#endif tags to make sure they can't use XNACC in WP7/Xbox360
|
||||||
* - Adding axioslog command to output AxiosLog
|
* - Adding axioslog command to output AxiosLog
|
||||||
|
* - Changing variables in CommandConsoleBase to be non-static
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -23,18 +23,18 @@ namespace Axios.Engine
|
|||||||
{
|
{
|
||||||
public class AxiosCommandConsole : CommandConsoleBase
|
public class AxiosCommandConsole : CommandConsoleBase
|
||||||
{
|
{
|
||||||
//private AxiosGameScreen _gameScreen;
|
protected AxiosGameScreen GameScreen;
|
||||||
public AxiosCommandConsole(AxiosGameScreen gameScreen)
|
public AxiosCommandConsole(AxiosGameScreen gameScreen)
|
||||||
: base(gameScreen.ScreenManager.Game)
|
: base(gameScreen.ScreenManager.Game)
|
||||||
{
|
{
|
||||||
//_gameScreen = gameScreen;
|
GameScreen = gameScreen;
|
||||||
Keyboard = gameScreen.ScreenManager.InputState;
|
Keyboard = gameScreen.ScreenManager.InputState;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AxiosCommandConsole(AxiosGameScreen gameScreen, SpriteFont font)
|
public AxiosCommandConsole(AxiosGameScreen gameScreen, SpriteFont font)
|
||||||
: base(gameScreen.ScreenManager.Game, font)
|
: base(gameScreen.ScreenManager.Game, font)
|
||||||
{
|
{
|
||||||
//_gameScreen = gameScreen;
|
GameScreen = gameScreen;
|
||||||
Keyboard = gameScreen.ScreenManager.InputState;
|
Keyboard = gameScreen.ScreenManager.InputState;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ namespace Axios.Engine
|
|||||||
protected override void UnloadContent()
|
protected override void UnloadContent()
|
||||||
{
|
{
|
||||||
base.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)
|
public override void HandleInput(GameTime gameTime, InputState input)
|
||||||
{
|
{
|
||||||
#if WINDOWS
|
#if WINDOWS
|
||||||
if (_console == null || !_console.Active || (AllowKeyboardWhileConsoleIsActive && _console.Active) )
|
if (_console == null || !AxiosCommandConsole.Active || (AllowKeyboardWhileConsoleIsActive && AxiosCommandConsole.Active))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
base.HandleInput(gameTime, input);
|
base.HandleInput(gameTime, input);
|
||||||
@ -429,6 +429,7 @@ namespace Axios.Engine
|
|||||||
#if WINDOWS
|
#if WINDOWS
|
||||||
if (_console != null)
|
if (_console != null)
|
||||||
{
|
{
|
||||||
|
//System.Diagnostics.Debugger.Break();
|
||||||
ScreenManager.Game.Components.Remove(_console);
|
ScreenManager.Game.Components.Remove(_console);
|
||||||
_console.Dispose();
|
_console.Dispose();
|
||||||
_console = null;
|
_console = null;
|
||||||
|
@ -498,16 +498,16 @@ namespace XNACC.Console
|
|||||||
#region Command Processing
|
#region Command Processing
|
||||||
// -- Command Processing-Related Fields...
|
// -- Command Processing-Related Fields...
|
||||||
/// <summary>Collection Of Command Objects.</summary>
|
/// <summary>Collection Of Command Objects.</summary>
|
||||||
protected static SortedDictionary<string,CmdObject> ms_commands = new SortedDictionary<string, CmdObject>();
|
protected SortedDictionary<string,CmdObject> ms_commands = new SortedDictionary<string, CmdObject>();
|
||||||
/// <summary>Collection Of function Objects.</summary>
|
/// <summary>Collection Of function Objects.</summary>
|
||||||
protected static SortedDictionary<string, FuncObject> ms_functions = new SortedDictionary<string, FuncObject>();
|
protected SortedDictionary<string, FuncObject> ms_functions = new SortedDictionary<string, FuncObject>();
|
||||||
/// <summary>Collection Of External Functions.</summary>
|
/// <summary>Collection Of External Functions.</summary>
|
||||||
protected static SortedDictionary<string, ExternalFuncObject> ms_externalFunctions = new SortedDictionary<string, ExternalFuncObject>();
|
protected SortedDictionary<string, ExternalFuncObject> ms_externalFunctions = new SortedDictionary<string, ExternalFuncObject>();
|
||||||
/// <summary>Collection Of Binding Objects.</summary>
|
/// <summary>Collection Of Binding Objects.</summary>
|
||||||
protected static List<BindingObject> ms_bindings = new List<BindingObject>( 8 );
|
protected List<BindingObject> ms_bindings = new List<BindingObject>( 8 );
|
||||||
|
|
||||||
/// <summary>Colleciton Of Partial Command Matches</summary>
|
/// <summary>Colleciton Of Partial Command Matches</summary>
|
||||||
protected static List<string> ms_partialCmdMatches = new List<string>( 8 );
|
protected List<string> ms_partialCmdMatches = new List<string>( 8 );
|
||||||
/// <summary>Symbol table for the console variables</summary>
|
/// <summary>Symbol table for the console variables</summary>
|
||||||
protected Dictionary<string, CVar> m_cVars = new Dictionary<string, CVar>( 8 );
|
protected Dictionary<string, CVar> m_cVars = new Dictionary<string, CVar>( 8 );
|
||||||
/// <summary>Match index for the last partial command</summary>
|
/// <summary>Match index for the last partial command</summary>
|
||||||
@ -570,7 +570,7 @@ namespace XNACC.Console
|
|||||||
/// <summary>The stream for shadowing the log to</summary>
|
/// <summary>The stream for shadowing the log to</summary>
|
||||||
protected StreamWriter m_logShadowFile = null;
|
protected StreamWriter m_logShadowFile = null;
|
||||||
/// <summary>Storage for the log</summary>
|
/// <summary>Storage for the log</summary>
|
||||||
protected List<string> m_log = new List<string>( 256 );
|
protected static List<string> m_log = new List<string>( 256 );
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Command History
|
#region Command History
|
||||||
@ -578,7 +578,7 @@ namespace XNACC.Console
|
|||||||
/// <summary>Specifies the limit of the command history</summary>
|
/// <summary>Specifies the limit of the command history</summary>
|
||||||
protected int m_cmdHistoryLimit = 512;
|
protected int m_cmdHistoryLimit = 512;
|
||||||
/// <summary>Collection of command history</summary>
|
/// <summary>Collection of command history</summary>
|
||||||
protected List<string> m_cmdHistory = new List<string>( 128 );
|
protected static List<string> m_cmdHistory = new List<string>( 128 );
|
||||||
/// <summary>Current index in the command history</summary>
|
/// <summary>Current index in the command history</summary>
|
||||||
protected int m_cmdHistoryIndex = 0;
|
protected int m_cmdHistoryIndex = 0;
|
||||||
/// <summary>Scanning (up/down) index in of the command history</summary>
|
/// <summary>Scanning (up/down) index in of the command history</summary>
|
||||||
@ -635,8 +635,9 @@ namespace XNACC.Console
|
|||||||
m_stringHeight = Vector2.Zero;
|
m_stringHeight = Vector2.Zero;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>Indicates if the console is active or not</summary>
|
|
||||||
public bool Active
|
/// <summary>Indicates if the console is active or not</summary>
|
||||||
|
public static bool Active
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
|
Loading…
Reference in New Issue
Block a user