main.cs 678 B

12345678910111213141516171819202122232425262728293031323334
  1. using MonoMac.AppKit;
  2. using MonoMac.Foundation;
  3. namespace TiledSprites
  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. private TiledSpritesSample game;
  19. public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
  20. {
  21. game = new TiledSpritesSample ();
  22. game.Run ();
  23. }
  24. public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)
  25. {
  26. return true;
  27. }
  28. }
  29. }