rpsplaytimer.cpp

来自「基于symbian UIQ 的一款古老的飞机游戏。对入门学习很有帮助。」· C++ 代码 · 共 35 行

CPP
35
字号
// Copyright (c) Symbian Ltd 2008. All rights reserved.

#include "rpsPlayTimer.h"
#include "rpsGameScreens.h"

CPlayTimer* CPlayTimer::NewL(TTimeIntervalMicroSeconds32 aInterval, CPlayScreen& aPlayScreen)
	{
	CPlayTimer* me = new (ELeave) CPlayTimer(aInterval, aPlayScreen);
	CleanupStack::PushL(me);
	me->ConstructL();
	CleanupStack::Pop(me);
	return (me);
	}

CPlayTimer::~CPlayTimer()
	{
	Cancel();
	}

void CPlayTimer::Start()
	{
	After(iInterval);
	}

void CPlayTimer::RunL()
	{
	iPlayScreen.PlayTimeout();
	}

CPlayTimer::CPlayTimer(TTimeIntervalMicroSeconds32 aInterval, CPlayScreen& aPlayScreen)
: CTimer(CActive::EPriorityStandard), iInterval(aInterval), iPlayScreen(aPlayScreen)
	{
	CActiveScheduler::Add(this);
	}

⌨️ 快捷键说明

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