MainActivity.cs 667 B

123456789101112131415161718
  1. using Android.App;
  2. using Android.Content.PM;
  3. using Android.OS;
  4. namespace ShatterEffect.Android
  5. {
  6. [Activity(Label = "ShatterEffectSample", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize)]
  7. public class MainActivity : AndroidGameActivity
  8. {
  9. protected override void OnCreate(Bundle savedInstanceState)
  10. {
  11. base.OnCreate(savedInstanceState);
  12. var g = new ShatterEffectGame();
  13. SetContentView((View)g.Services.GetService(typeof(View)));
  14. g.Run();
  15. }
  16. }
  17. }