Program.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 : UIApplicationDelegate
  20. {
  21. private PlatformerGame game;
  22. public override bool FinishedLaunching (UIApplication app, NSDictionary options)
  23. {
  24. // Fun begins..
  25. game = new PlatformerGame();
  26. game.Run();
  27. return true;
  28. }
  29. static void Main (string [] args)
  30. {
  31. UIApplication.Main (args,null,"AppDelegate");
  32. }
  33. }
  34. #else
  35. static class Program
  36. {
  37. /// <summary>
  38. /// The main entry point for the application.
  39. /// </summary>
  40. static void Main(string[] args)
  41. {
  42. using (PlatformerGame game = new PlatformerGame())
  43. {
  44. game.Run();
  45. }
  46. }
  47. }
  48. #endif
  49. }