internal static void Initialise(Game1 game) { _window = (UIWindow)game.Services.GetService (typeof(UIWindow)); if (_window == null) throw new InvalidOperationException( "iOSGamePlatform must add the main UIWindow to Game.Services"); _gameViewController = (UIViewController)game.Services.GetService (typeof(UIViewController)); if (_gameViewController == null) throw new InvalidOperationException( "iOSGamePlatform must add the game UIViewController to Game.Services"); game.Exiting += Game_Exiting; _isInitialised = true; }
private static void Uninitialise(Game1 game) { game.Exiting -= Game_Exiting; _window = null; _gameViewController = null; _isInitialised = false; }
public override void FinishedLaunching(UIApplication app) { // Fun begins.. game = new Game1 (); game.Run (); }