实体
计时 CTimer
帧步长、游戏时间与暂停
CTimer.h
逻辑帧步长、游戏时间、暂停与慢动作。插值、冷却、计时都靠它。
帧步长
ms_fTimeStep / ms_fTimeStepNonClipped
物理 / 动画乘 dt 用。
static float& ms_fTimeStep;
static float& ms_fTimeStepNonClipped;
static float& ms_fOldTimeStep;游戏毫秒
m_snTimeInMilliseconds
static unsigned int& m_snTimeInMilliseconds;
static unsigned int& m_snTimeInMillisecondsNonClipped;
static unsigned int& m_snTimeInMillisecondsPauseMode;
static unsigned int& m_snPreviousTimeInMilliseconds;时间缩放与慢动作
ms_fTimeScale / bSlowMotionActive
static float& ms_fTimeScale;
static float& ms_fSlowMotionScale;
static bool& bSlowMotionActive;
static bool GetIsSlowMotionActive();暂停
m_UserPause / StartUserPause / Suspend
static bool& m_UserPause;
static bool& m_CodePause;
static void StartUserPause();
static void EndUserPause();
static void Suspend();
static void Resume();帧计数与 FPS
m_FrameCounter / game_FPS
static unsigned int& m_FrameCounter;
static float& game_FPS;
static bool& bSkipProcessThisFrame;高精度周期
GetCurrentTimeInCycles / GetCyclesPerMillisecond
static unsigned int GetCurrentTimeInCycles();
static int GetCyclesPerMillisecond();
static int GetCyclesPerFrame();