Пример #1
0
        private void OnUpdateFrame(object sender, MonoGameAndroidGameView.FrameEventArgs frameEventArgs)
        {
            GameView.MakeCurrent();

            Threading.Run();

            if (_game != null)
            {
                if (!GameView.IsResuming && _game.Platform.IsActive && !ScreenReceiver.ScreenLocked) //Only call draw if an update has occured
                {
                    _game.Tick();
                }
                else if (_game.GraphicsDevice != null)
                {
                    _game.GraphicsDevice.Clear(Color.Black);
                    if (GameView.IsResuming && Resumer != null)
                    {
                        Resumer.Draw();
                    }
                    _game.Platform.Present();
                }
            }
        }
Пример #2
0
        private void OnRenderFrame(object sender, MonoGameAndroidGameView.FrameEventArgs frameEventArgs)
        {
            GameView.MakeCurrent();

            Threading.Run();
        }