Changeset 10746 for code/branches/fabienHS15/src
- Timestamp:
- Nov 1, 2015, 10:25:57 PM (9 years ago)
- Location:
- code/branches/fabienHS15/src
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/fabienHS15/src/modules/overlays/hud/CMakeLists.txt
r10688 r10746 5 5 HUDSpeedBar.cc 6 6 HUDBoostBar.cc 7 HUDShieldBar.cc 7 8 HUDHealthBar.cc 8 9 HUDTimer.cc -
code/branches/fabienHS15/src/modules/pickup/items/MunitionPickup.h
r10715 r10746 48 48 namespace orxonox 49 49 { 50 50 /** 51 @brief 52 The MunitionPickup gives munition to the user (a @ref Pawn). 53 */ 51 54 class _PickupExport MunitionPickup : public Pickup 52 55 { -
code/branches/fabienHS15/src/orxonox/worldentities/pawns/Pawn.cc
r10739 r10746 61 61 62 62 this->bAlive_ = true; 63 this->bShieldRecharging_ = false;64 63 65 64 this->health_ = 0; … … 71 70 this->maxShieldHealth_ = 100; //otherwise shield might increase to float_max 72 71 this->shieldAbsorption_ = 0.5; 73 74 72 this->shieldRechargeRate_ = 0; 75 73 this->shieldRechargeWaitTime_ = 1.0f; … … 153 151 void Pawn::registerVariables() 154 152 { 155 registerVariable(this->bAlive_, VariableDirection::ToClient); 156 registerVariable(this->health_, VariableDirection::ToClient); 157 registerVariable(this->maxHealth_, VariableDirection::ToClient); 158 registerVariable(this->shieldHealth_, VariableDirection::ToClient); 159 registerVariable(this->maxShieldHealth_, VariableDirection::ToClient); 160 registerVariable(this->shieldAbsorption_, VariableDirection::ToClient); 161 registerVariable(this->bShieldRecharging_, VariableDirection::ToServer); 162 registerVariable(this->aimPosition_, VariableDirection::ToServer); // For the moment this variable gets only transfered to the server 153 registerVariable(this->bAlive_, VariableDirection::ToClient); 154 registerVariable(this->health_, VariableDirection::ToClient); 155 registerVariable(this->maxHealth_, VariableDirection::ToClient); 156 registerVariable(this->shieldHealth_, VariableDirection::ToClient); 157 registerVariable(this->maxShieldHealth_, VariableDirection::ToClient); 158 registerVariable(this->shieldAbsorption_, VariableDirection::ToClient); 159 registerVariable(this->aimPosition_, VariableDirection::ToServer); // For the moment this variable gets only transfered to the server 163 160 } 164 161 … … 167 164 SUPER(Pawn, tick, dt); 168 165 169 this->bShieldRecharging_ = false; 170 166 // Recharge the shield 171 167 // TODO: use the existing timer functions instead 172 168 if(this->shieldRechargeWaitCountdown_ > 0) … … 252 248 if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator)) 253 249 { 250 // Health-damage cannot be absorbed by shields. 251 // Shield-damage only reduces shield health. 252 // Normal damage can be (partially) absorbed by shields. 253 254 254 if (shielddamage >= this->getShieldHealth()) 255 255 { … … 480 480 } 481 481 482 void Pawn::reload()483 {484 this->bShieldRecharging_ = true;485 }486 487 482 void Pawn::postSpawn() 488 483 { -
code/branches/fabienHS15/src/orxonox/worldentities/pawns/Pawn.h
r10739 r10746 42 42 /** 43 43 @brief 44 Everything in Orxono ythat has a health attribute is a Pawn. After a Pawn is spawned its health is set to44 Everything in Orxonox that has a health attribute is a Pawn. After a Pawn is spawned its health is set to 45 45 its initial health. In every call of the Pawns tick function the game checks whether the pawns health is at 46 46 or below zero. If it is, the pawn gets killed. … … 141 141 142 142 virtual void fired(unsigned int firemode); 143 virtual void reload();144 143 virtual void postSpawn(); 145 144 … … 234 233 235 234 WeaponSystem* weaponSystem_; 236 bool bShieldRecharging_;237 235 238 236 std::string spawnparticlesource_; -
code/branches/fabienHS15/src/orxonox/worldentities/pawns/SpaceShip.h
r10724 r10746 53 53 - The <b>boost</b>, there are quite some parameters pertaining to boosting. The boost is a special move of the SpaceShip, where, for a limited amount of time, it can fly considerably faster than usual. The <b>boostPower</b> is the amount of power available for boosting. The <b>boostPowerRate</b> is the rate at which the boost power is replenished. The <b>boostRate</b> is the rate at which boosting uses power. And the <b>boostCooldownDuration</b> is the time the SpaceShip cannot boost, once all the boost power has been used up. Naturally all of these parameters must be non-negative. 54 54 - The <b>boost shaking</b>, when the SpaceShip boosts, the camera shakes to create a more immersive effect. Two parameters can be used to adjust the effect. The <b>shakeFrequency</b> is the frequency with which the camera shakes. And the <b>shakeAmplitude</b> is the amount with which the camera shakes. Again these parameters must bee non-negative. 55 - The <b>lift</b> creates a more natural flight feeling through the addition of a lift force. There are again t owparameters that can be specified. The <b>lift</b> which is the lift force that is applied. And the <b>stallSpeed</b> which is the forward speed after which no more lift is generated.55 - The <b>lift</b> creates a more natural flight feeling through the addition of a lift force. There are again two parameters that can be specified. The <b>lift</b> which is the lift force that is applied. And the <b>stallSpeed</b> which is the forward speed after which no more lift is generated. 56 56 57 57 As mentioned @ref orxonox::Engine Engines can be mounted on the SpaceShip. Here is a (primitive) example of a SpaceShip defined in XML: … … 267 267 bool bBoostCooldown_; //!< Whether the SpaceShip is currently in boost cooldown, during which boosting is impossible. 268 268 float initialBoostPower_; //!< The initial (and maximal) boost power. 269 float boostPower_; //!< The current boost power. 269 float boostPower_; //!< The current boost power. If the boost power is reduced to zero the boost cooldown will start. 270 270 float boostPowerRate_; //!< The rate at which the boost power is recharged. 271 271 float boostRate_; //!< The rate at which boost power is used up. … … 294 294 std::vector<Engine*> engineList_; //!< The list of all Engines mounted on this SpaceShip. 295 295 296 Timer timer_; //!< Timer for the cooldown duration.296 Timer timer_; //!< Timer for the cooldown of the boost. 297 297 float shakeDt_; //!< Temporary variable for the shaking of the camera. 298 298 Vector3 cameraOriginalPosition_; //!< The original position of the camera before shaking it.
Note: See TracChangeset
for help on using the changeset viewer.