MainActivity.cs 647 B

12345678910111213141516171819
  1. using Android.App;
  2. using Android.Content.PM;
  3. using Android.OS;
  4. using Microsoft.Xna.Framework;
  5. namespace Audio3D.Android
  6. {
  7. [Activity(Label = "Audio3D", MainLauncher = true, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.KeyboardHidden | ConfigChanges.ScreenSize, ScreenOrientation = ScreenOrientation.Landscape)]
  8. public class MainActivity : AndroidGameActivity
  9. {
  10. protected override void OnCreate(Bundle bundle)
  11. {
  12. base.OnCreate(bundle);
  13. var g = new Audio3DGame();
  14. SetContentView((g.Services.GetService(typeof(View))) as View);
  15. g.Run();
  16. }
  17. }
  18. }