public GameView(Android.Content.Context context, Input input) : base(context) { this.input = input; androidSoftKeyboard = new AndroidSoftKeyboard(this); Application.SoftKeyboard = androidSoftKeyboard; for (int i = 0; i < Input.MaxTouches; i++) { pointerIds[i] = -1; } keyboardHandler = new KeyboardHandler(input); SetOnKeyListener(keyboardHandler); stopwatch.Start(); }
public GameView(Android.Content.Context context, Input input) : base(context) { this.AutoSetContextOnRenderFrame = false; this.input = input; androidSoftKeyboard = new AndroidSoftKeyboard(this); Application.SoftKeyboard = androidSoftKeyboard; for (int i = 0; i < Input.MaxTouches; i++) { pointerIds[i] = -1; } keyboardHandler = new KeyboardHandler(input); SetOnKeyListener(keyboardHandler); RestrictSupportedOrientationsWith(Application.SupportedDeviceOrientations); var readyToRenderGetter = typeof(OpenTK.Platform.Android.AndroidGameView).GetProperty("ReadyToRender", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).GetMethod; readyToRender = (Func <bool>)readyToRenderGetter.CreateDelegate(typeof(Func <bool>), this); }
public GameView(Android.Content.Context context, Input input) : base(context) { this.input = input; androidSoftKeyboard = new AndroidSoftKeyboard(this); Application.SoftKeyboard = androidSoftKeyboard; for (int i = 0; i < Input.MaxTouches; i++) { pointerIds[i] = -1; } keyboardHandler = new KeyboardHandler(input); SetOnKeyListener(keyboardHandler); egl = EGLContext.EGL.JavaCast <IEGL10>(); holder = Holder; holder.AddCallback(this); holder.SetType(SurfaceType.Gpu); windowManager = context.GetSystemService(Android.Content.Context.WindowService).JavaCast <IWindowManager>(); }