Changeset 10650 for code/trunk/src/orxonox
- Timestamp:
- Oct 12, 2015, 10:57:00 PM (9 years ago)
- Location:
- code/trunk/src/orxonox
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/weaponsystem/Weapon.cc
r9667 r10650 95 95 } 96 96 97 /** 98 @brief 99 Fire this Weapon with the the WeaponMode defined by @param mode 100 */ 97 101 void Weapon::fire(unsigned int mode) 98 102 { -
code/trunk/src/orxonox/weaponsystem/Weapon.h
r9667 r10650 39 39 namespace orxonox 40 40 { 41 /** 42 @brief 43 A Weapon is a StaticEntity that can be attached to a WeaponSlot. A Weapon can shoot with different @ref orxonox::WeaponMode modes. 44 Imagine for example that a machine gun can shoot normal bullets, tracer bullets or even grenades. 45 */ 41 46 class _OrxonoxExport Weapon : public StaticEntity 42 47 { … … 53 58 WeaponMode* getWeaponmode(unsigned int index) const; 54 59 60 /** 61 @brief 62 This function is called by a @ref orxonox::WeaponPack if this Weapon is added to the WeaponPack. 63 */ 55 64 inline void setWeaponPack(WeaponPack * weaponPack) 56 65 { this->weaponPack_ = weaponPack; this->notifyWeaponModes(); } … … 58 67 { return this->weaponPack_; } 59 68 69 /** 70 @brief 71 This function is called by a @ref orxonox::WeaponSlot if this Weapon gets attached to the WeaponSlot. 72 */ 60 73 inline void setWeaponSlot(WeaponSlot * wSlot) 61 74 { this->weaponSlot_ = wSlot; } -
code/trunk/src/orxonox/weaponsystem/WeaponMode.cc
r10624 r10650 128 128 if (!this->bReloading_ && this->munition_ && this->munition_->takeMunition(this->munitionPerShot_, this)) 129 129 { 130 float reloadtime = this->reloadTime_;130 float tempReloadtime = this->reloadTime_; 131 131 132 132 if (this->bAutoReload_ && this->munition_->needReload(this)) … … 135 135 { 136 136 if (this->bParallelReload_) 137 reloadtime = std::max(this->reloadTime_, this->munition_->getReloadTime());137 tempReloadtime = std::max(this->reloadTime_, this->munition_->getReloadTime()); 138 138 else 139 reloadtime = this->reloadTime_ + this->munition_->getReloadTime();139 tempReloadtime = this->reloadTime_ + this->munition_->getReloadTime(); 140 140 } 141 141 } 142 142 143 143 this->bReloading_ = true; 144 this->reloadTimer_.setInterval( reloadtime);144 this->reloadTimer_.setInterval(tempReloadtime); 145 145 this->reloadTimer_.startTimer(); 146 146 -
code/trunk/src/orxonox/weaponsystem/WeaponMode.h
r9667 r10650 41 41 namespace orxonox 42 42 { 43 /** 44 @brief 45 A WeaponMode defines how a Weapon is used. It specifies what kind of @ref orxonox::Projectile is created when you fire it, how much time it takes to reload, what sound you hear while shooting, how much damage the projectile deals to a target, ... 46 */ 43 47 class _OrxonoxExport WeaponMode : public BaseObject 44 48 { -
code/trunk/src/orxonox/weaponsystem/WeaponPack.cc
r9667 r10650 70 70 } 71 71 72 /** 73 @brief 74 Fire all weapons in this WeaponSet with the defined weaponmode. 75 */ 72 76 void WeaponPack::fire(unsigned int weaponmode) 73 77 { … … 76 80 } 77 81 82 /** 83 @brief 84 Reload all weapons in this WeaponSet. 85 */ 78 86 void WeaponPack::reload() 79 87 { -
code/trunk/src/orxonox/weaponsystem/WeaponSet.cc
r9667 r10650 62 62 void WeaponSet::fire() 63 63 { 64 // fire all WeaponPacks with their defined weaponmode64 // Fire all WeaponPacks with their defined weaponmode 65 65 for (std::map<WeaponPack*, unsigned int>::iterator it = this->weaponpacks_.begin(); it != this->weaponpacks_.end(); ++it) 66 66 if (it->second != WeaponSystem::WEAPON_MODE_UNASSIGNED) … … 70 70 void WeaponSet::reload() 71 71 { 72 // fireall WeaponPacks with their defined weaponmode72 // Reload all WeaponPacks with their defined weaponmode 73 73 for (std::map<WeaponPack*, unsigned int>::iterator it = this->weaponpacks_.begin(); it != this->weaponpacks_.end(); ++it) 74 74 it->first->reload(); -
code/trunk/src/orxonox/weaponsystem/WeaponSlot.h
r10648 r10650 37 37 /** 38 38 @brief 39 The a WeaponSlot defines where a @ref orxonox::Weapon "Weapon" is placed on a pawn. (A WeaponSlot is a StaticEntity)39 The a WeaponSlot defines where a @ref orxonox::Weapon "Weapon" is placed on a pawn. A WeaponSlot is a @ref orxonox::StaticEntity, therefore it has a position and orientation. 40 40 In a WeaponSlot there can be only one "Weapon", but a Weapon can have several @ref orxonox::WeaponMode "WeaponModes". 41 41 A WeaponMode is what one intuitively imagines as weapon. (E.g. RocketFire, LightningGun, LaserFire are weaponmodes) -
code/trunk/src/orxonox/weaponsystem/WeaponSystem.cc
r9667 r10650 283 283 } 284 284 285 /** 286 @brief 287 Fires the @ref Orxonox::WeaponSet with the specified firemode. 288 */ 285 289 void WeaponSystem::fire(unsigned int firemode) 286 290 { -
code/trunk/src/orxonox/weaponsystem/WeaponSystem.h
r9667 r10650 40 40 namespace orxonox 41 41 { 42 /** 43 @brief 44 An @ref orxonox::Pawn that is able to fire weapons always need to have a WeaponSystem. The WeaponSystem manages all the @ref orxonox::WeaponSet, @ref orxonox::WeaponPack and @ref orxonox::WeaponSlot classes. 45 46 */ 42 47 class _OrxonoxExport WeaponSystem : public BaseObject 43 48 { -
code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
r10624 r10650 299 299 } 300 300 301 302 301 void Pawn::kill() 303 302 { … … 319 318 } 320 319 } 321 322 320 323 321 void Pawn::death() … … 472 470 } 473 471 472 /** 473 @brief 474 Check whether the Pawn has a @ref Orxonox::WeaponSystem and fire it with the specified firemode if it has one. 475 */ 474 476 void Pawn::fired(unsigned int firemode) 475 477 {
Note: See TracChangeset
for help on using the changeset viewer.