-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathActivity1.cs
36 lines (31 loc) · 979 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
35
36
using Android.App;
using Android.Content.PM;
using Android.Media.TV;
using Android.OS;
using Android.Views;
using Android.Views.InputMethods;
using Microsoft.Xna.Framework;
namespace ShaderSample
{
[Activity(
Label = "@string/app_name",
MainLauncher = true,
Icon = "@drawable/icon",
AlwaysRetainTaskState = true,
LaunchMode = LaunchMode.SingleInstance,
ScreenOrientation = ScreenOrientation.Landscape,
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden | ConfigChanges.ScreenSize
)]
public class Activity1 : AndroidGameActivity
{
ShaderGame game;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
game = new ShaderGame();
var gameView = game.Services.GetService(typeof(View)) as View;
SetContentView(gameView);
game.Run();
}
}
}