Program.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. using System;
  10. #if IPHONE
  11. using MonoTouch.Foundation;
  12. using MonoTouch.UIKit;
  13. #endif
  14. using Microsoft.Xna.Framework;
  15. namespace Platformer
  16. {
  17. #if IPHONE
  18. [Register ("AppDelegate")]
  19. class Program : MonoGameProgram
  20. {
  21. public override bool FinishedLaunching (UIApplication app, NSDictionary options)
  22. {
  23. // Fun begins..
  24. MonoGameGame = new PlatformerGame();
  25. MonoGameGame.Run();
  26. return true;
  27. }
  28. static void Main (string [] args)
  29. {
  30. UIApplication.Main (args,null,"AppDelegate");
  31. }
  32. }
  33. #else
  34. static class Program
  35. {
  36. /// <summary>
  37. /// The main entry point for the application.
  38. /// </summary>
  39. static void Main(string[] args)
  40. {
  41. using (PlatformerGame game = new PlatformerGame())
  42. {
  43. game.Run();
  44. }
  45. }
  46. }
  47. #endif
  48. }