📄 cmodelgame.h
字号:
///////////////////////////////////////////////////////////////////////////////
//
// CModelGame.h
//
// Copyright (c) 2003 Forum Nokia. All rights reserved.
//
// Technology developed by Rocket Science Oy Ltd
//
///////////////////////////////////////////////////////////////////////////////
#ifndef __CMODELGAME_H__
#define __CMODELGAME_H__
// INCLUDE FILES
#include "MModel.h"
#include "MSystem.h"
#include "CFont.h"
// FORWARD DECLARATIONS
class CSprite;
class MCharacter;
class CTileMap;
// CLASS DECLARATION
/**
* CModelGame Class of the main game.
*/
class CModelGame
: public CBase
, public MModel
{
public:
/**
* Two-phased constructor.
*/
static CModelGame* NewL( MSystem* aSystem );
/**
* Destructor.
*/
~CModelGame();
private:
/**
* Default constructor
*/
CModelGame( MSystem* aSystem );
/**
* Second phase constructor.
*/
void ConstructL();
public: // MModel
void ActivateL();
void Deactivate();
void Draw( CBitmap& aTarget );
void Move();
private: // Data members
MSystem* iSystem; /// pointer to system
TPoint iCamera;
TPoint iCameraPos;
// game bitmaps
CBitmap* iBmTest;
CBitmap* iBmTile;
CBitmap* iBmPlayer;
CBitmap* iBmMonster;
CBitmap* iBmDiamond;
CBitmap* iBmDiamondBox;
CBitmap* iBmFont;
// font
CBmFont* iFont;
// sprites
CSprite* iSprPlayer;
CSprite* iSprMonster;
CSprite* iSprDiamond;
CSprite* iSprDiamondBox;
// tilemap ( map of game level )
CTileMap* iTileMap;
// character list
RPointerArray< MCharacter > iCharacter;
// characters
MCharacter* iPlayer;
MCharacter* iMonster;
MCharacter* iDiamond;
MCharacter* iDiamondBox;
TRect iLevelWarp;
TBool iPlayerDead; /// player dead flag
TInt iTime; /// time
TInt iScore; /// score
TTime iCurrentTime; /// time for timings
};
#endif
// End of file
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -