- Timestamp:
- May 8, 2014, 4:20:26 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/modularships/src/orxonox/items/ShipPart.cc
r10033 r10052 40 40 #include "gametypes/Gametype.h" 41 41 #include "worldentities/StaticEntity.h" 42 #include "items/PartDestructionEvent.h" 42 43 43 44 … … 66 67 67 68 XMLPortParam(ShipPart, "damageabsorption", setDamageAbsorption, getDamageAbsorption, xmlelement, mode).defaultValues(0.5); 69 70 XMLPortObject(ShipPart, PartDestructionEvent, "destructionevents", addDestructionEvent, getDestructionEvent, xmlelement, mode); 68 71 69 72 /* … … 142 145 orxout() << " " << this->entityList_[j]->getName() << endl; 143 146 } 147 } 148 149 /** 150 @brief 151 Add a PartDestructionEvent to the ShipPart. 152 @param engine 153 A pointer to the PartDestructionEvent to be added. 154 */ 155 void ShipPart::addDestructionEvent(PartDestructionEvent* part) 156 { 157 OrxAssert(part != NULL, "The PartDestructionEvent cannot be NULL."); 158 this->eventList_.push_back(part); 159 //part->setParent(this); 160 } 161 162 /** 163 @brief 164 Get the i-th PartDestructionEvent of the ShipPart. 165 @return 166 Returns a pointer to the i-the PartDestructionEvent. NULL if there is no PartDestructionEvent with that index. 167 */ 168 PartDestructionEvent* ShipPart::getDestructionEvent(unsigned int index) 169 { 170 if(this->eventList_.size() >= index) 171 return NULL; 172 else 173 return this->eventList_[index]; 144 174 } 145 175
Note: See TracChangeset
for help on using the changeset viewer.