📄 resourcemgr.h
字号:
/**
* File : ResourceMgr.h
* Author : Kevin Lynx
* Date : 2007/8/1
*/
#ifndef _RESOURCE_MGR_H_
#define _RESOURCE_MGR_H_
#include "Singleton.h"
/**
* ResourceMgr
*
* manage all the common resources( meshes, textures, etc ) and maintain them
*/
class ResourceMgr : public Singleton<ResourceMgr>
{
public:
/**
* billboard animation type
*
*/
enum
{
EXP_STONE = 0,
EXP_HURT_SPRITE,
EXP_RES_COUNT
};
public:
/**
* Constructor
*
*/
ResourceMgr( IrrlichtDevice *device );
/**
* Destructor
*
*/
~ResourceMgr();
/**
* load
*
* it will load all the common resources
*/
bool load();
/**
* free
*
* free all the common resources
*/
void free();
/**
* getTextureGroup
*
* there are many groups of textures, you can use a group textures
* to create a texture animator, and you can use getLastTexture
* to get the last texture element of one group
*/
array<ITexture*> &getTextureGroup( int expType );
/**
* getLastTexture
*
*/
ITexture *getLastTexture( int expType );
private:
IrrlichtDevice *mDevice;
public:
/// public resourcs that you can access directly
IAnimatedMesh *mBulletMesh;
IAnimatedMesh *mBeanMesh;
IAnimatedMesh *mPacMesh;
ITexture *mPacTexture;
array<ITexture*> mExpTexture[EXP_RES_COUNT];
ITexture *mSkyboxText;
IGUIFont *mBigFont;
IGUIFont *mNormalFont;
ITexture *mLifeSign;
ITexture *mScoreSign;
ITexture *mClockSign;
ITexture *mBeanSign;
ITexture *mGameOver;
ITexture *mLevelClear;
ITexture *mTimeOut;
ITexture *mGUIButtonS;
ITexture *mGUIButtonP;
ITexture *mGUIMainBack;
ITexture *mGUITV1;
ITexture *mGUITV2;
ITexture *mGUITV3;
ITexture *mGUITV_Noise1;
ITexture *mGUITV_Noise2;
ITexture *mGUITV_Noise3;
ITexture *mGUIHelp;
ITexture *mGUICursor;
ITexture *mGUIBlankBack;
ITexture *mGUILogo;
};
#endif // end _RESOURCE_MGR_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -