diff options
| author | Ben Beltran <ben@nsovocal.com> | 2014-02-10 22:14:10 -0600 |
|---|---|---|
| committer | Ben Beltran <ben@nsovocal.com> | 2014-02-10 22:14:10 -0600 |
| commit | 63419029fbda7d3f2f3d5984c3d2c77f341dbd79 (patch) | |
| tree | f4c0a51017b957f2dfded3b4fc6b8ff3c3b58e45 /SuperPolarityMac/Main.cs | |
| parent | 10980f9b5db812487ecc118fa8f8255024624e9a (diff) | |
Works in win, compiles in mac
Diffstat (limited to 'SuperPolarityMac/Main.cs')
| -rw-r--r-- | SuperPolarityMac/Main.cs | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/SuperPolarityMac/Main.cs b/SuperPolarityMac/Main.cs new file mode 100644 index 0000000..f21bf0b --- /dev/null +++ b/SuperPolarityMac/Main.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using MonoMac.AppKit; +using MonoMac.Foundation; + +namespace SuperPolarityMac +{ + static class Program + { + /// <summary> + /// The main entry point for the application. + /// </summary> + static void Main (string[] args) + { + NSApplication.Init (); + + using (var p = new NSAutoreleasePool ()) { + NSApplication.SharedApplication.Delegate = new AppDelegate (); + NSApplication.Main (args); + } + + + } + } + + class AppDelegate : NSApplicationDelegate + { + Game1 game; + + public override void FinishedLaunching (MonoMac.Foundation.NSObject notification) + { + game = new Game1 (); + game.Run (); + } + + public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender) + { + return true; + } + } +} + + |