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

📄 cmodelgame.h

📁 基于SYMBIAN OS,series 60平台的经典游戏,超级马力
💻 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 + -