SND\AstrorEnales_cp ca0d730bbb - Working on Metro Platform and Rendering
- Further implementations in the PsVita RenderSystem
2012-08-12 20:00:19 +00:00

76 lines
1.3 KiB
C#

using System;
using ANX.Framework;
using Windows.ApplicationModel.Core;
// This file is part of the ANX.Framework created by the
// "ANX.Framework developer group" and released under the Ms-PL license.
// For details see: http://anxframework.codeplex.com/license
namespace ANX.PlatformSystem.Metro
{
public class WindowsGameHost : GameHost, IFrameworkViewSource
{
public static WindowsGameHost Instance
{
get;
private set;
}
#region Private
private Game game;
private WindowsGameWindow gameWindow;
internal bool ExitRequested
{
get;
private set;
}
#endregion
#region Public
public override GameWindow Window
{
get
{
return gameWindow;
}
}
#endregion
#region Constructor
public WindowsGameHost(Game setGame)
: base(setGame)
{
Instance = this;
game = setGame;
gameWindow = new WindowsGameWindow(this);
}
#endregion
#region Run
public override void Run()
{
CoreApplication.Run(this);
}
#endregion
internal void InvokeOnIdle()
{
OnIdle();
}
#region Exit
public override void Exit()
{
ExitRequested = true;
}
#endregion
#region CreateView
public IFrameworkView CreateView()
{
return gameWindow;
}
#endregion
}
}