Adding empty AxiosCommandConsole to not require #if WINDOWS/#endif precompiler
statments on WP7/Xbox 360 Adjusting code in AxiosGameScreen to accept it on WP7/Xbox 360 but just store it --HG-- branch : xnacc-integration
This commit is contained in:
@@ -41,9 +41,7 @@ namespace Axios.Engine
|
||||
|
||||
private Camera camera;
|
||||
|
||||
#if WINDOWS
|
||||
AxiosCommandConsole _console = null;
|
||||
#endif
|
||||
|
||||
public AxiosGameScreen()
|
||||
: base()
|
||||
@@ -98,21 +96,22 @@ namespace Axios.Engine
|
||||
|
||||
public void AddGameObject(object obj)
|
||||
{
|
||||
|
||||
#if WINDOWS
|
||||
if (obj is AxiosCommandConsole)
|
||||
{
|
||||
if (_console != null)
|
||||
{
|
||||
//remove the current one first
|
||||
#if WINDOWS
|
||||
ScreenManager.Game.Components.Remove(_console);
|
||||
_console.Dispose();
|
||||
#endif
|
||||
_console = null;
|
||||
}
|
||||
_console = (AxiosCommandConsole)obj;
|
||||
#if WINDOWS
|
||||
ScreenManager.Game.Components.Add(_console);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (obj is AxiosGameObject || obj is AxiosUIObject || obj is AxiosTimer)
|
||||
{
|
||||
AxiosGameObject tmp = obj as AxiosGameObject;
|
||||
|
Reference in New Issue
Block a user