Changeset 11060
- Timestamp:
- Jan 13, 2016, 10:40:06 PM (9 years ago)
- Location:
- code/branches/cpp11_v3/src/orxonox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v3/src/orxonox/items/ShipPart.cc
r11054 r11060 182 182 } 183 183 184 void ShipPart::setDamageAbsorption(float value)185 {186 this->damageAbsorption_ = value;187 }188 189 184 void ShipPart::setParent(ModularSpaceShip* ship) 190 185 { 191 186 this->parent_ = ship; 192 }193 194 /**195 @brief196 Sets the health of the ShipPart.197 */198 void ShipPart::setHealth(float health)199 {200 this->health_ = health;201 187 } 202 188 -
code/branches/cpp11_v3/src/orxonox/items/ShipPart.h
r11054 r11060 64 64 PartDestructionEvent* getDestructionEvent(unsigned int index); 65 65 66 virtual void setDamageAbsorption(float value); 67 inline float getDamageAbsorption() 66 inline void setDamageAbsorption(float value) 67 { this->damageAbsorption_ = value; } 68 inline float getDamageAbsorption() const 68 69 { return this->damageAbsorption_; } 69 70 70 71 void setParent(ModularSpaceShip* ship); 71 inline ModularSpaceShip* getParent() 72 inline ModularSpaceShip* getParent() const 72 73 { return this->parent_; } 73 74 74 75 inline void setEventExecution(bool var) 75 76 { this->eventExecution_ = var; } 76 inline bool isEventExecution() 77 inline bool isEventExecution() const 77 78 { return this->eventExecution_; } 78 79 79 virtual void setHealth(float health); 80 inline void setHealth(float health) 81 { this->health_ = health; } 80 82 inline void addHealth(float health) 81 83 { this->setHealth(this->health_ + health); } -
code/branches/cpp11_v3/src/orxonox/worldentities/pawns/Pawn.h
r11059 r11060 71 71 72 72 73 v irtual void setHealth(float health);73 void setHealth(float health); 74 74 inline void addHealth(float health) 75 75 { this->setHealth(this->health_ + health); } … … 89 89 { return this->initialHealth_; } 90 90 91 v irtual void setShieldHealth(float shieldHealth);91 void setShieldHealth(float shieldHealth); 92 92 93 93 inline float getShieldHealth() … … 100 100 { return (this->getShieldHealth() > 0); } 101 101 102 v irtual void setMaxShieldHealth(float maxshieldhealth);102 void setMaxShieldHealth(float maxshieldhealth); 103 103 inline float getMaxShieldHealth() const 104 104 { return this->maxShieldHealth_; } … … 119 119 { return this->shieldAbsorption_; } 120 120 121 v irtual void setShieldRechargeRate(float shieldRechargeRate);121 void setShieldRechargeRate(float shieldRechargeRate); 122 122 inline float getShieldRechargeRate() const 123 123 { return this->shieldRechargeRate_; } 124 124 125 v irtual void setShieldRechargeWaitTime(float shieldRechargeWaitTime);125 void setShieldRechargeWaitTime(float shieldRechargeWaitTime); 126 126 inline float getShieldRechargeWaitTime() const 127 127 { return this->shieldRechargeWaitTime_; } … … 133 133 { this->shieldRechargeWaitCountdown_ = this->getShieldRechargeWaitTime(); } // TODO: Implement in Projectile.cc 134 134 135 v irtual void decreaseShieldRechargeCountdownTime(float dt);135 void decreaseShieldRechargeCountdownTime(float dt); 136 136 137 137 /** @brief Sets the state of the pawns vulnerability. @param bVulnerable */ … … 215 215 const std::string& getExplosionSound(); 216 216 217 virtualconst WeaponSystem* getWeaponSystem() const217 inline const WeaponSystem* getWeaponSystem() const 218 218 { return this->weaponSystem_; } 219 219
Note: See TracChangeset
for help on using the changeset viewer.