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

📄 gameobjectitem.h

📁 <B>DirectX9.0 3D游戏编程</B>
💻 H
字号:
/********************************************************************
 *   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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -