コード例 #1
0
ファイル: Main.cs プロジェクト: nagyist/drumkit-wp
        /// <summary>
        /// Updates the game state
        /// </summary>
        protected override void Update(GameTime gameTime)
        {
            inputState.Update();
            HandleInput(inputState);

#if DEBUG // Calculate FPS
            float elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds;
            fps           = 1 / elapsed;
            deltaFPSTime += elapsed;

            if (deltaFPSTime > 1)
            {
                fpsInfo       = "Running at <" + fps.ToString() + "> FPS." + (gameTime.IsRunningSlowly ? " Running slowly." : "");
                deltaFPSTime -= 1;
            }
#endif
            if (recorder.Playing)
            {
                recorder.Update();
            }

            activeView.Update(gameTime);
            base.Update(gameTime);
        }