gametimer.h
来自「一个symbian 冒险游戏代码」· C头文件 代码 · 共 62 行
H
62 行
////////////////////////////////////////////////////////////////////////
//
// GameTimer.h
//
// Copyright (c) 2006 Nokia Corporation. All rights reserved.
//
////////////////////////////////////////////////////////////////////////
#ifndef _GAMETIMER_H_
#define _GAMETIMER_H_
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
#include <e32base.h>
#include <e32std.h>
////////////////////////////////////////////////////////////////////////
class MGameTimerObserver;
////////////////////////////////////////////////////////////////////////
class CGameTimer : public CBase
{
public:
enum { StopTicking, TickAgain };
public:
static CGameTimer* NewL(MGameTimerObserver& aObserver);
static CGameTimer* NewLC(MGameTimerObserver& aObserver);
~CGameTimer();
void Restart();
TBool IsActive();
void CancelTimer();
// interval in microseconds
int interval() const;
protected:
CGameTimer(MGameTimerObserver& aObserver);
private:
void ConstructL();
TInt HandleGameTimerCompleted();
TInt HandleGameTimerCompletedL();
static TInt TimerCompleted(TAny* aObject);
private:
MGameTimerObserver& iObserver;
CPeriodic* iPeriodicTimer;
};
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
#endif // _GAMETIMER_H_
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?