Changeset 10724 for code/branches/fabienHS15/src/orxonox/worldentities
- Timestamp:
- Oct 30, 2015, 7:51:49 PM (9 years ago)
- Location:
- code/branches/fabienHS15/src/orxonox/worldentities/pawns
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/fabienHS15/src/orxonox/worldentities/pawns/SpaceShip.cc
r10216 r10724 297 297 } 298 298 } 299 300 void SpaceShip::gainBoostPower(float gainedBoostPower) 301 { 302 this->boostPower_ += gainedBoostPower; 303 304 if (this->boostPower_ > this->initialBoostPower_) 305 { 306 this->boostPower_ = this->initialBoostPower_; 307 } 308 309 // If the booster is in cooldown mode and we gained boost power, the abort the cooldown. 310 if (this->isBoostCoolingDown() && this->boostPower_ > 0.0f) 311 { 312 timer_.stopTimer(); 313 this->boostCooledDown(); 314 } 315 } 316 299 317 /** 300 318 @brief -
code/branches/fabienHS15/src/orxonox/worldentities/pawns/SpaceShip.h
r10437 r10724 250 250 inline float getShakeAmplitude() const 251 251 { return this->shakeAmplitude_; } 252 /** 253 @brief Add boost power. Is non-negative. 254 @return Returns the current boost power. 255 */ 256 void gainBoostPower(float gainedBoostPower); 252 257 253 258 protected:
Note: See TracChangeset
for help on using the changeset viewer.