mirror of
https://github.com/openeggbert/mobile-eggbert-monogame-android.git
synced 2025-03-25 15:47:50 +01:00
35 lines
967 B
C#
35 lines
967 B
C#
|
using Android.App;
|
||
|
using Android.Content.PM;
|
||
|
using Android.OS;
|
||
|
using Android.Views;
|
||
|
using Microsoft.Xna.Framework;
|
||
|
|
||
|
namespace sb2013
|
||
|
{
|
||
|
[Activity(
|
||
|
Label = "@string/app_name",
|
||
|
MainLauncher = true,
|
||
|
Icon = "@drawable/icon",
|
||
|
AlwaysRetainTaskState = true,
|
||
|
LaunchMode = LaunchMode.SingleInstance,
|
||
|
ScreenOrientation = ScreenOrientation.FullUser,
|
||
|
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden | ConfigChanges.ScreenSize
|
||
|
)]
|
||
|
public class Activity1 : AndroidGameActivity
|
||
|
{
|
||
|
private Game1 _game;
|
||
|
private View _view;
|
||
|
|
||
|
protected override void OnCreate(Bundle bundle)
|
||
|
{
|
||
|
base.OnCreate(bundle);
|
||
|
|
||
|
_game = new Game1();
|
||
|
_view = _game.Services.GetService(typeof(View)) as View;
|
||
|
|
||
|
SetContentView(_view);
|
||
|
_game.Run();
|
||
|
}
|
||
|
}
|
||
|
}
|