Program.cs 762 B

1234567891011121314151617181920212223
  1. using Android.App;
  2. using Android.Content.PM;
  3. using Android.OS;
  4. using Microsoft.Xna.Framework;
  5. using Gemstone_Hunter;
  6. namespace GemstoneHunter.Android
  7. {
  8. [Activity(Label = "Gemstone Hunter", MainLauncher = true, Icon = "@drawable/icon",
  9. ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden)]
  10. public class Activity1 : AndroidGameActivity
  11. {
  12. private Game1 _game;
  13. protected override void OnCreate(Bundle bundle)
  14. {
  15. base.OnCreate(bundle);
  16. _game = new Game1();
  17. SetContentView((Android.Views.View)_game.Services.GetService(typeof(Android.Views.View)));
  18. _game.RunOneFrame();
  19. }
  20. }
  21. }