Program.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #region File Description
  2. //-----------------------------------------------------------------------------
  3. // Program.cs
  4. //
  5. // Microsoft XNA Community Game Platform
  6. // Copyright (C) Microsoft Corporation. All rights reserved.
  7. //-----------------------------------------------------------------------------
  8. #endregion
  9. #region Using Statements
  10. using System;
  11. using MonoMac.Foundation;
  12. using MonoMac.AppKit;
  13. using MonoMac.ObjCRuntime;
  14. #endregion
  15. namespace TransformedCollision
  16. {
  17. static class Program
  18. {
  19. /// <summary>
  20. /// The main entry point for the application.
  21. /// </summary>
  22. static void Main (string[] args)
  23. {
  24. NSApplication.Init ();
  25. using (var p = new NSAutoreleasePool ()) {
  26. NSApplication.SharedApplication.Delegate = new AppDelegate();
  27. NSApplication.Main(args);
  28. }
  29. }
  30. }
  31. class AppDelegate : NSApplicationDelegate
  32. {
  33. TransformedCollisionGame game;
  34. public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
  35. {
  36. game = new TransformedCollisionGame();
  37. game.Run();
  38. }
  39. public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)
  40. {
  41. return true;
  42. }
  43. }
  44. }