Exemple #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="frameEventArgs"></param>
        private void OnUpdateFrame(object sender, AndroidGameView.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(System.Drawing.Color.Black);

                    _game.Platform.Present();
                }
            }
        }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="frameEventArgs"></param>
        private void OnRenderFrame(object sender, AndroidGameView.FrameEventArgs frameEventArgs)
        {
            GameView.MakeCurrent();

            Threading.Run();
        }