␍␊ |
AxiosCommandConsole _console = null;␍␊ |
␍␊ |
protected bool AllowKeyboardWhileConsoleIsActive = false;␍␊ |
␍␊ |
public AxiosCommandConsole Console␍␊ |
{␍␊ |
get { return _console; }␍␊ |
private set { _console = value; }␍␊ |
}␍␊ |
␍␊ |
public AxiosGameScreen()␍␊ |
: base()␍␊ |
{␍␊ |
|
_console = (AxiosCommandConsole)obj;␍␊ |
#if WINDOWS␍␊ |
ScreenManager.Game.Components.Add(_console);␍␊ |
_console.LoadContent(ScreenManager.Game.Content);␍␊ |
#endif␍␊ |
}␍␊ |
if (obj is AxiosGameObject || obj is AxiosUIObject || obj is AxiosTimer)␍␊ |
|
public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen)␍␊ |
{␍␊ |
base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen);␍␊ |
␍␊ |
␍␊ |
if (this._objectstoremove.Count > 0)␍␊ |
{␍␊ |
List<AxiosGameObject> list = this._objectstoremove.ToList<AxiosGameObject>();␍␊ |
|
␍␊ |
public override void HandleInput(GameTime gameTime, InputState input)␍␊ |
{␍␊ |
base.HandleInput(gameTime, input);␍␊ |
if ((AllowKeyboardWhileConsoleIsActive && _console.Active) || !_console.Active)␍␊ |
{␍␊ |
base.HandleInput(gameTime, input);␍␊ |
␍␊ |
foreach (AxiosGameObject g in _gameObjects.ToList())␍␊ |
g.HandleInput(this, input, gameTime);␍␊ |
foreach (AxiosGameObject g in _gameObjects.ToList())␍␊ |
g.HandleInput(this, input, gameTime);␍␊ |
␍␊ |
foreach (AxiosUIObject g in _uiobjects.ToList())␍␊ |
g.HandleInput(this, input, gameTime);␍␊ |
foreach (AxiosUIObject g in _uiobjects.ToList())␍␊ |
g.HandleInput(this, input, gameTime);␍␊ |
}␍␊ |
}␍␊ |
␍␊ |
public override void Deactivate()␍␊ |
public override void Unload()␍␊ |
{␍␊ |
//System.Diagnostics.Debugger.Break();␍␊ |
base.Deactivate();␍␊ |
AxiosLog.Instance.AddLine("Memory usage before cleanup: " + GC.GetTotalMemory(true).ToString(), LoggingFlag.DEBUG);␍␊ |
foreach (AxiosGameObject g in _gameObjects)␍␊ |
|
//AxiosIsolatedFile f = new AxiosIsolatedFile("log.log");␍␊ |
//f.WriteData(AxiosLog.Instance.GetLog(), FileMode.Append);␍␊ |
//CleanUp();␍␊ |
#if WINDOWS␍␊ |
if (_console != null)␍␊ |
{␍␊ |
ScreenManager.Game.Components.Remove(_console);␍␊ |
_console.Dispose();␍␊ |
}␍␊ |
#endif␍␊ |
}␍␊ |
␍␊ |
␍␊ |