Created
October 9, 2012 15:32
-
-
Save smooki/3859550 to your computer and use it in GitHub Desktop.
game.Run(); never called not even FinishedLaunching
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using MonoMac.AppKit; | |
using MonoMac.Foundation; | |
namespace Breakout | |
{ | |
class MainClass | |
{ | |
static void Main (string[] args) | |
{ | |
NSApplication.Init (); | |
using (var p = new NSAutoreleasePool()) { | |
NSApplication.SharedApplication.Delegate = new AppDelegate(); | |
// Set our Application Icon | |
//NSImage appIcon = NSImage.ImageNamed ("monogameicon.png"); | |
//NSApplication.SharedApplication.ApplicationIconImage = appIcon; | |
NSApplication.Main (args); | |
} | |
} | |
} | |
class AppDelegate : NSApplicationDelegate | |
{ | |
private Game1 game; | |
public override void FinishedLaunching(MonoMac.Foundation.NSObject notification) | |
{ | |
game = new Game1(); | |
game.Run(); | |
} | |
public override bool ApplicationShouldTerminateAfterLastWindowClosed(NSApplication sender) | |
{ | |
return true; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment