Пример #1
0
        /// <summary>
        /// Logic update
        /// </summary>
        /// <param name="pDt"></param>
        public static void OnFrameMove()
        {
            // Calc time
            float dt = CalcDt();

            // Calc FPS
            mFPSCounter++;
            mTimeCounter += dt;
            if (mTimeCounter >= 1)
            {
                mFPS         = mFPSCounter;
                mFPSCounter  = 0;
                mTimeCounter = 0;
            }

            mPlayer.OnFrameMove(dt);

            if (CurrentLevel != null)
            {
                CurrentLevel.OnFrameMove(dt);
            }
        }