- Timestamp:
- Dec 4, 2009, 3:52:28 PM (15 years ago)
- Location:
- code/branches/presentation2/src/modules/weapons/weaponmodes
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/modules/weapons/weaponmodes/HsW01.cc
r6227 r6245 52 52 RegisterObject(HsW01); 53 53 54 this->reloadTime_ = 0. 5;54 this->reloadTime_ = 0.25; 55 55 this->damage_ = 15; 56 56 this->speed_ = 2500; … … 61 61 this->delayTimer_.stopTimer(); 62 62 63 this->defSndWpnFire_ = new WorldSound(this); 64 this->defSndWpnFire_->setLooping(false); 65 this->setDefaultSound("sounds/Weapon_Laser_shrt.ogg"); 63 this->setDefaultSound("sounds/Weapon_HsW01.ogg"); 66 64 } 67 65 68 66 HsW01::~HsW01() 69 67 { 70 if(this->isInitialized())71 {72 delete this->defSndWpnFire_;73 }74 68 } 75 69 … … 106 100 void HsW01::fire() 107 101 { 108 this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->attach(this->defSndWpnFire_);109 this->defSndWpnFire_->play();110 111 102 this->delayTimer_.startTimer(); 112 113 //this->defSndWpnFire_->stop();114 103 } 115 104 … … 142 131 HsW01::muendungsfeuer(); 143 132 } 144 145 void HsW01::setDefaultSound(const std::string& soundPath)146 {147 this->defSndWpnFire_->setSource(soundPath);148 }149 150 const std::string& HsW01::getDefaultSound()151 {152 return this->defSndWpnFire_->getSource();153 }154 133 } -
code/branches/presentation2/src/modules/weapons/weaponmodes/HsW01.h
r6227 r6245 46 46 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 47 47 48 void setDefaultSound(const std::string& soundPath);49 const std::string& getDefaultSound();50 51 48 private: 52 49 void setMaterial(const std::string& material); … … 61 58 float delay_; 62 59 Timer delayTimer_; 63 64 WorldSound* defSndWpnFire_;65 60 }; 66 61 } -
code/branches/presentation2/src/modules/weapons/weaponmodes/LightningGun.cc
r6154 r6245 36 36 #include "worldentities/pawns/Pawn.h" 37 37 38 #include "sound/WorldSound.h" 39 38 40 namespace orxonox 39 41 { … … 49 51 50 52 this->setMunitionName("LaserMunition"); 53 this->setDefaultSound("sounds/Weapon_LightningGun.ogg"); 51 54 } 52 55 … … 56 59 57 60 void LightningGun::fire() 58 { 61 { 59 62 LightningGunProjectile* projectile = new LightningGunProjectile(this); 60 63 projectile->setMaterial("Flares/LightningBall_"); -
code/branches/presentation2/src/modules/weapons/weaponmodes/LightningGun.h
r5781 r6245 42 42 43 43 virtual void fire(); 44 44 45 private: 45 46 float speed_; -
code/branches/presentation2/src/modules/weapons/weaponmodes/RocketFire.cc
r6153 r6245 38 38 #include "worldentities/pawns/Pawn.h" 39 39 40 #include "sound/WorldSound.h" 41 40 42 namespace orxonox 41 43 { … … 52 54 53 55 this->setMunitionName("RocketMunition"); 56 this->setDefaultSound("sounds/Rocket_Launch.ogg"); 57 } 58 59 RocketFire::~RocketFire() 60 { 54 61 } 55 62 -
code/branches/presentation2/src/modules/weapons/weaponmodes/RocketFire.h
r6107 r6245 39 39 public: 40 40 RocketFire(BaseObject* creator); 41 virtual ~RocketFire() {}41 virtual ~RocketFire(); 42 42 43 43 virtual void fire();
Note: See TracChangeset
for help on using the changeset viewer.