gameobjectitem.h
来自「<B>DirectX9.0 3D游戏编程</B>」· C头文件 代码 · 共 52 行
H
52 行
/********************************************************************
* Title: GameObjectItem.h
* Desc: Item in the game. This class encapsulates all items
* in the game, from weapons to ammo to health boxes.
* Author: Cuban
* Started:
*******************************************************************/
#ifndef GAMEOBJECTITEM
#define GAMEOBJECTITEM
#include "..\GameObject.h"
#include "..\ResourceMgr.h"
enum eItemType
{
it_Health5,
it_Health20,
it_Health50,
it_Ammo
};
class cGameObjectItem : public cGameObject
{
public:
cGameObjectItem();
virtual ~cGameObjectItem();
//==========-------------------------- Interface routines
virtual bool IsObject( eObjectType objType );
//==========-------------------------- Scene-Management routines
virtual void AddToScene();
virtual void RemoveFromScene();
//==========-------------------------- Processing functions
virtual void Tick( float tickLength );
virtual void Draw();
//==========-------------------------- Object-Info functions
virtual bool IsGhost(){ return false; }
virtual bool IsFloater(){ return true; }
virtual bool IsNoclip(){ return false; }
virtual void RespondToCollision( cGameObject* pOther );
//static cGameObjectItem* CreateItem(
};
#endif // GAMEOBJECTITEM
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?