?? timer.h
字號:
#ifndef TIMER_H
#define TIMER_H
#include <windows.h>
//Timer class, to control the FPS and the animations speed
class Timer
{
public:
Timer();
void UpdateTimer(); //This method updates the timer. May be called once in all frames
unsigned long GetTimeBetweenTwoFrames() {return m_diffTime;}; //returns the elapsed time between the current frame and the last frame
unsigned long GetTotalTime() {return m_accumTime;}; // return the time elapsed since the creation of the timer
int GetFPS() {return m_fps;}; // returns the frames per second
private:
unsigned long m_diffTime;
unsigned long m_accumTime;
unsigned long m_lastTime;
unsigned long m_frameTime;
int m_fps;
};
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -