Changeset 10011 for code/branches/modularships/src/orxonox/ShipPart.h
- Timestamp:
- Apr 2, 2014, 8:38:07 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/modularships/src/orxonox/ShipPart.h
r10007 r10011 31 31 32 32 #include "OrxonoxPrereqs.h" 33 #include "items/Item.h" 33 34 34 35 #include <string> … … 38 39 { // tolua_export 39 40 class _OrxonoxExport ShipPart // tolua_export 41 : public Item 40 42 { // tolua_export 41 43 … … 44 46 virtual ~ShipPart(); 45 47 48 //virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 49 50 virtual void handleHit(float damage, float healthdamage, float shielddamage, Pawn* originator); 51 52 //virtual void attachTo(Pawn* newParent); 53 //virtual void detach(); 54 55 void addEntity(StaticEntity* entity); 56 StaticEntity* getEntity(unsigned int index); 57 58 virtual void setDamageAbsorption(float value); 59 inline float getDamageAbsorption() 60 { return this->damageAbsorption_; } 61 62 virtual void setHealth(float health); 63 inline void addHealth(float health) 64 { this->setHealth(this->health_ + health); } 65 inline void removeHealth(float health) 66 { this->setHealth(this->health_ - health); } 67 inline float getHealth() const 68 { return this->health_; } 69 70 // FIXME: (noep) Why doesn't this work? Works fine in Engine.h 71 //void addToSpaceShip(ModularSpaceShip* ship); 72 46 73 protected: 74 Pawn* parent_; 75 unsigned int parentID_; // Object ID of the SpaceShip the Part is mounted on. 47 76 77 float damageAbsorption_; 78 float health_; 48 79 49 80 private: 50 81 std::vector<StaticEntity*> entityList_; // list of all entities which belong to this part 51 82 52 83 }; // tolua_export
Note: See TracChangeset
for help on using the changeset viewer.