FarseerPhysics.Samples.ScreenSystem.FrameRateCounter.Update C# (CSharp) Méthode

Update() public méthode

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void
        public void Update(GameTime gameTime)
        {
            _elapsedTime += gameTime.ElapsedGameTime;

            if (_elapsedTime > TimeSpan.FromSeconds(1.0))
            {
                _elapsedTime -= TimeSpan.FromSeconds(1.0);
                _frameRate = _frameCounter;
                _frameCounter = 0;
            }
        }