1234567891011121314151617181920212223242526272829 |
- using Android.App;
- using Android.Content.PM;
- using Android.OS;
- using Android.Views;
- using Microsoft.Xna.Framework;
- namespace RockRain.Android
- {
- [Activity(
- Label = "RockRain",
- MainLauncher = true,
- AlwaysRetainTaskState = true,
- LaunchMode = LaunchMode.SingleInstance,
- ScreenOrientation = ScreenOrientation.FullUser,
- ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden | ConfigChanges.ScreenSize | ConfigChanges.ScreenLayout)]
- public class MainActivity : AndroidGameActivity
- {
- private Game1 game;
- protected override void OnCreate(Bundle bundle)
- {
- base.OnCreate(bundle);
- game = new Game1();
- SetContentView((View)game.Services.GetService(typeof(View)));
- game.Run();
- }
- }
- }
|