From 63419029fbda7d3f2f3d5984c3d2c77f341dbd79 Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Mon, 10 Feb 2014 22:14:10 -0600 Subject: Works in win, compiles in mac --- SuperPolarityMac/Main.cs | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 SuperPolarityMac/Main.cs (limited to 'SuperPolarityMac/Main.cs') 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 + { + /// + /// The main entry point for the application. + /// + 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; + } + } +} + + -- cgit