예제 #1
0
        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;
        }
예제 #2
0
 private static void Uninitialise(Game1 game)
 {
     game.Exiting -= Game_Exiting;
     _window = null;
     _gameViewController = null;
     _isInitialised = false;
 }
예제 #3
0
파일: Main.cs 프로젝트: halterdev/Hooked
 public override void FinishedLaunching(UIApplication app)
 {
     // Fun begins..
     game = new Game1 ();
     game.Run ();
 }