|
@@ -1,6 +1,9 @@
|
|
|
#region Using Statements
|
|
|
using System;
|
|
|
-#if IPHONE
|
|
|
+#if MONOMAC
|
|
|
+using MonoMac.AppKit;
|
|
|
+using MonoMac.Foundation;
|
|
|
+#elif IPHONE
|
|
|
using MonoTouch.Foundation;
|
|
|
using MonoTouch.UIKit;
|
|
|
using Microsoft.Xna;
|
|
@@ -12,7 +15,37 @@ using Microsoft.Xna.Framework.Media;
|
|
|
namespace GameStateManagement
|
|
|
{
|
|
|
#region Entry Point
|
|
|
-#if IPHONE
|
|
|
+#if MONOMAC
|
|
|
+ class Program
|
|
|
+ {
|
|
|
+ static void Main (string[] args)
|
|
|
+ {
|
|
|
+ NSApplication.Init ();
|
|
|
+
|
|
|
+ using (var p = new NSAutoreleasePool ()) {
|
|
|
+ NSApplication.SharedApplication.Delegate = new AppDelegate ();
|
|
|
+
|
|
|
+ NSApplication.Main (args);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ class AppDelegate : NSApplicationDelegate
|
|
|
+ {
|
|
|
+ private GameStateManagementGame game;
|
|
|
+
|
|
|
+ public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
|
|
|
+ {
|
|
|
+ game = new GameStateManagementGame ();
|
|
|
+ game.Run();
|
|
|
+ }
|
|
|
+
|
|
|
+ public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+#elif IPHONE
|
|
|
[Register("AppDelegate")]
|
|
|
class Program : UIApplicationDelegate
|
|
|
{
|