Skip to content

Instantly share code, notes, and snippets.

@smooki
Created October 9, 2012 15:32
Show Gist options
  • Save smooki/3859550 to your computer and use it in GitHub Desktop.
Save smooki/3859550 to your computer and use it in GitHub Desktop.
game.Run(); never called not even FinishedLaunching
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