Program.cs 662 B

123456789101112131415161718192021222324252627282930313233
  1. using MonoMac.AppKit;
  2. using MonoMac.Foundation;
  3. namespace Platformer
  4. {
  5. class Program
  6. {
  7. static void Main (string [] args)
  8. {
  9. NSApplication.Init ();
  10. using (var p = new NSAutoreleasePool ()) {
  11. NSApplication.SharedApplication.Delegate = new AppDelegate();
  12. NSApplication.Main(args);
  13. }
  14. }
  15. }
  16. class AppDelegate : NSApplicationDelegate
  17. {
  18. public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
  19. {
  20. using (PlatformerGame game = new PlatformerGame()) {
  21. game.Run ();
  22. }
  23. }
  24. public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)
  25. {
  26. return true;
  27. }
  28. }
  29. }