]> git.r.bdr.sh - rbdr/super-polarity/blob - SuperPolarityMac/Main.cs
f21bf0bb758a6e1070eecbc3c358eac2cc160bee
[rbdr/super-polarity] / SuperPolarityMac / Main.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using MonoMac.AppKit;
5 using MonoMac.Foundation;
6
7 namespace SuperPolarityMac
8 {
9 static class Program
10 {
11 /// <summary>
12 /// The main entry point for the application.
13 /// </summary>
14 static void Main (string[] args)
15 {
16 NSApplication.Init ();
17
18 using (var p = new NSAutoreleasePool ()) {
19 NSApplication.SharedApplication.Delegate = new AppDelegate ();
20 NSApplication.Main (args);
21 }
22
23
24 }
25 }
26
27 class AppDelegate : NSApplicationDelegate
28 {
29 Game1 game;
30
31 public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
32 {
33 game = new Game1 ();
34 game.Run ();
35 }
36
37 public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)
38 {
39 return true;
40 }
41 }
42 }
43
44