cgametimer.h

来自「在symbian2.0平台上开发的完整的俄罗斯方块的源码。」· C头文件 代码 · 共 52 行

H
52
字号
#ifndef __CGAMETIMER_H
#define __CGAMETIMER_H


// INCLUDES
#include <e32base.h>

class MGameTimerObserver;
// CGameTime's purpose give a regular timer to CGameEngine

class CGameTimer : public CBase
{
// Construct and destruct
public:
	static CGameTimer* NewL(MGameTimerObserver& aObserver);

	~CGameTimer();
private:
	CGameTimer(MGameTimerObserver& aObserver);

	void ConsturctL();

/////////////////////////////////////////////////////////////////////
// Other method
public:
	void Start();		// start time
	void Cancel();		// cancel time

	void SetTickTime(TTimeIntervalMicroSeconds32 aTickTime);

private:
	static TInt Period(TAny* aPtr);

	/// Called by Period
	/// @return boolean ETrue continues timer, EFalse stops.
	TInt DoCall();

/////////////////////////////////////////////////////////////////////
// data
private:
	TTimeIntervalMicroSeconds32  iTick;

	MGameTimerObserver& iObserver;

	CPeriodic* iPeriodicTimer;			// has a

};




#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?