⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cgametimer.h

📁 Symbian开发提高的一个很好的实例,其实现了一个非常好理解的Symbian游戏开发流程
💻 H
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -