00001 #ifndef ISHOOTABLE_H_INCLUDED 00002 #define ISHOOTABLE_H_INCLUDED 00003 00004 #include <btBulletDynamicsCommon.h> 00005 #include "Horde3D.h" 00006 00007 #include "Physics.h" 00008 #include "Game.h" 00009 00010 //forward declarations 00011 class Game; 00012 class Physics; 00013 00019 class IShootable { 00020 protected: 00024 int _id; 00030 int _health; 00034 btRigidBody* _body; 00038 H3DNode _parent; 00042 Game* _game; 00046 Physics* _physics; 00050 const char* _name; 00051 public: 00056 virtual void hit() = 0; //pure virtual function 00057 00065 IShootable(Game* game, H3DNode parent, Physics* physics, const int id, const char* name) 00066 : _game(game), _parent(parent), _physics(physics), _id(id), _name(name) { } 00067 00072 int getID() { 00073 return _id; 00074 } 00075 00080 int getHealth() { 00081 return _health; 00082 } 00083 00088 btRigidBody* getBody() { 00089 return _body; 00090 } 00091 00096 const char* getName() { 00097 return _name; 00098 } 00099 }; 00100 00101 #endif