- Timestamp:
- Nov 17, 2015, 10:30:24 PM (9 years ago)
- Location:
- code/branches/fabienHS15/src/modules/weapons/weaponmodes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/fabienHS15/src/modules/weapons/weaponmodes/RocketFire.cc
r10794 r10814 41 41 #include "weaponsystem/WeaponSystem.h" 42 42 #include "worldentities/pawns/Pawn.h" 43 43 #include "core/XMLPort.h" 44 44 #include "weapons/projectiles/Rocket.h" 45 45 … … 56 56 this->damage_ = 0.0f; 57 57 this->speed_ = 500.0f; 58 this->fuel_ = 10.0f; 58 59 59 60 this->setMunitionName("RocketMunition"); … … 65 66 RocketFire::~RocketFire() 66 67 { 68 } 69 70 /** 71 @brief 72 XMLPort for the RocketFire. You can define the maximum lifetime of the rockets 73 */ 74 void RocketFire::XMLPort(Element& xmlelement, XMLPort::Mode mode) 75 { 76 SUPER(RocketFire, XMLPort, xmlelement, mode); 77 78 XMLPortParam(RocketFire, "fuel", setFuel, getFuel, xmlelement, mode); 67 79 } 68 80 … … 85 97 rocket->setShieldDamage(this->getShieldDamage()); 86 98 rocket->setHealthDamage(this->getHealthDamage()); 99 rocket->setMaxFuel(this->fuel_); 87 100 } 88 101 } -
code/branches/fabienHS15/src/modules/weapons/weaponmodes/RocketFire.h
r9667 r10814 54 54 virtual ~RocketFire(); 55 55 56 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 57 56 58 virtual void fire(); 59 inline void setFuel(float fuel) 60 { this->fuel_ = fuel; } 61 inline float getFuel() const 62 { return this->fuel_; } 57 63 58 64 private: 59 65 float speed_; //!< The speed of the Rocket. 66 float fuel_; //!< The maximum lifetime of the rocket 60 67 }; 61 68 } -
code/branches/fabienHS15/src/modules/weapons/weaponmodes/SplitGun.cc
r10688 r10814 35 35 36 36 #include "core/CoreIncludes.h" 37 #include "core/XMLPort.h" 37 #include "core/XMLPort.h" 38 38 #include "weaponsystem/Weapon.h" 39 39 #include "weaponsystem/WeaponPack.h"
Note: See TracChangeset
for help on using the changeset viewer.