MainActivity.cs 744 B

12345678910111213141516171819
  1. using Android.App;
  2. using Android.Content.PM;
  3. using Android.OS;
  4. using Microsoft.Xna.Framework;
  5. namespace Colored3DCube.Android
  6. {
  7. [Activity(Label = "Colored3DCube", MainLauncher = true, Icon = "@mipmap/icon", Theme = "@android:style/Theme.NoTitleBar.Fullscreen", 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 Colored3DCube.Game1();
  14. SetContentView((g.Services.GetService(typeof(View)) as View));
  15. g.Run();
  16. }
  17. }
  18. }