-
Notifications
You must be signed in to change notification settings - Fork 0
/
Activity1.cs
34 lines (30 loc) · 937 Bytes
/
Activity1.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using Android.App;
using Android.Content.PM;
using Android.OS;
using Android.Views;
using Microsoft.Xna.Framework;
namespace tamagotchi
{
[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();
}
}
}