2
0

Program.cs 843 B

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