AppDelegate.cs 818 B

1234567891011121314151617181920212223242526272829
  1. using Foundation;
  2. using UIKit;
  3. using Urho;
  4. using Urho.iOS;
  5. using System.Threading.Tasks;
  6. namespace $safeprojectname$
  7. {
  8. // The UIApplicationDelegate for the application. This class is responsible for launching the
  9. // User Interface of the application, as well as listening (and optionally responding) to application events from iOS.
  10. [Register("AppDelegate")]
  11. public class AppDelegate : UIApplicationDelegate
  12. {
  13. public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
  14. {
  15. LaunchGame();
  16. return true;
  17. }
  18. async void LaunchGame()
  19. {
  20. await Task.Yield();
  21. new MyGame(new ApplicationOptions("MyData")).Run();
  22. //Also, there is an UIView - UrhoSurface
  23. }
  24. }
  25. }