Dabrorius.MonoPunk.Engine.Update C# (CSharp) Method

Update() protected method

protected Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void
        protected override void Update(GameTime gameTime)
        {
            Input.UpdateKeyboardInput ();
            MP.Elapsed = gameTime.ElapsedGameTime.TotalMilliseconds / 1000;

            // Write frame rate to console
            frameRateSum += 1 / MP.Elapsed;
            frameRateCount += 1;
            if (frameRateCount == 100) {
                Console.WriteLine (frameRateSum / frameRateCount);
                frameRateSum = 0;
                frameRateCount = 0;
            }

            //if (FP.tweener.active && FP.tweener._tween) FP.tweener.updateTweens();
            if (MP.CurrentWorld.Active)
            {
                //if (FP._world._tween) FP._world.updateTweens();
                MP.CurrentWorld.Update();
            }
            MP.CurrentWorld.UpdateLists();
            if (MP.nextWorld != null) checkWorld();
            Input.SaveOldKeyboardInput();
            base.Update (gameTime);
        }