www.pudn.com > Example2D.rar > CChrDiamondBox.h
/////////////////////////////////////////////////////////////////////////////// // // CChrDiamondBox.h // // Copyright (c) 2003 Forum Nokia. All rights reserved. // // Technology developed by Rocket Science Oy Ltd // /////////////////////////////////////////////////////////////////////////////// #ifndef __CCHRDIAMONDBOX_H__ #define __CCHRDIAMONDBOX_H__ // INCLUDE FILES #include#include "MCharacter.h" // FORWARD DECLARATIONS class CSprite; class MSystem; class CTileMap; // CLASS DECLARATION /** * ChrDiamondBox class holds the behaviour of the diamondboxes */ class CChrDiamondBox : public CBase , public MCharacter { public: /** * Two-phased constructor. */ static CChrDiamondBox* NewL( CSprite* aSprite, MSystem* aSystem, CTileMap* aMap ); /** * Destructor. */ ~CChrDiamondBox(); private: /** * Default constructor */ CChrDiamondBox( CSprite* aSprite, MSystem* aSystem, CTileMap* aMap); /** * Second phase constructor */ void ConstructL(); public: // MCharacter void ActivateL(); void Deactivate(); void Draw( CBitmap& aTarget, const TPoint& aCamera ); void Move(); void SetPosition( const TPoint& aPosition ); void Die(); void SetType( const TChType& aChType ); TPoint Position(); CSprite* Sprite(); TChType Type(); private: // Data members CSprite* iSprite; MSystem* iSystem; CTileMap* iTileMap; TPoint iPosition; TPoint iSpeed; TInt iMonsterDir; TPoint iCameraPos; TBool iCollected; TChType iChType; }; #endif // End of file