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

📄 cgametimer.h

📁 一个基于symbian s60 3rd 的3D汽车游戏演示程序,模拟器上编译通过。
💻 H
字号:
   /*
============================================================================
    * Name : CGameTimer.h
    * Part of : Example3D
    * Description : Definition of CGameTimer
    * Copyright (c) 2007 Nokia Corporation
============================================================================
    */

#ifndef __CGAMETIMER_H__
#define __CGAMETIMER_H__


// INCLUDES
#include <e32base.h>

   
// FORWARD DECLARATIONS
class MGameTimerObserver;

// CLASS DECLARATION

/**
*  CGameTimer's purpose is to give all possible
*  processing time to CEngine without stalling
*  the operating system
*/

class CGameTimer 
    : public CBase
    {
    public:
        /// Two-phased constructor
        static CGameTimer* NewL( MGameTimerObserver& aObserver );

        /// Two-phased constructor
        /// leaves pointer to cleanup stack
        static CGameTimer* NewLC( MGameTimerObserver& aObserver );

        /// Destructor
        ~CGameTimer();

    private:

        /// Second-phase constructor
        void ConstructL();

        /// Default constructor
        CGameTimer( MGameTimerObserver& aObserver );

    public: // New methods:

        /// Starts timer
        void Start();

        /// Cancels timer
        void Cancel();

    private: // Private methods

        /// Callback called by CIdle member
        static TInt IdleCallBack( TAny* aPtr );

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

    private: // data

        MGameTimerObserver& iObserver;  // reference to timer observer ( CEngine )
        CIdle*  iIdle;                  // CIdle timer
        
    };

#endif

⌨️ 快捷键说明

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