Program.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using MonoGameDistortionSample.Core;
  2. using Foundation;
  3. using UIKit;
  4. namespace MonoGameDistortionSample.iOS
  5. {
  6. [Register("AppDelegate")]
  7. internal class Program : UIApplicationDelegate
  8. {
  9. private static MonoGameDistortionSampleGame _game;
  10. /// <summary>
  11. /// Initializes and starts the game by creating an instance of the
  12. /// Game class and calls its Run method.
  13. /// </summary>
  14. internal static void RunGame()
  15. {
  16. _game = new MonoGameDistortionSampleGame();
  17. _game.Run();
  18. }
  19. /// <summary>
  20. /// Called when the application has finished launching.
  21. /// This method starts the game by calling RunGame.
  22. /// </summary>
  23. /// <param name="app">The UIApplication instance representing the application.</param>
  24. public override void FinishedLaunching(UIApplication app)
  25. {
  26. RunGame();
  27. }
  28. /// <summary>
  29. /// The main entry point for the application.
  30. /// This sets up the application and specifies the UIApplicationDelegate
  31. /// class to handle application lifecycle events.
  32. /// </summary>
  33. /// <param name="args">Command-line arguments passed to the application.</param>
  34. static void Main(string[] args)
  35. {
  36. UIApplication.Main(args, null, typeof(Program));
  37. }
  38. }
  39. }