Changeset 11108 for code/trunk/src/orxonox/weaponsystem/WeaponMode.h
- Timestamp:
- Feb 4, 2016, 11:54:04 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/weaponsystem/WeaponMode.h
r11071 r11108 34 34 35 35 #include <string> 36 #include <vector> 36 37 #include "util/Math.h" 37 38 #include "core/BaseObject.h" … … 54 55 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; 55 56 56 bool fire(float* reloadTime);57 virtual bool fire(float* reloadTime); 57 58 bool reload(); 58 59 // Interacting with the default Firing sound60 void setDefaultSound(const std::string& soundPath);61 const std::string& getDefaultSound();62 void setDefaultSoundWithVolume(const std::string& soundPath, const float soundVolume);63 59 64 60 // Munition … … 155 151 void updateMunition(); 156 152 protected: 153 // Interacting with the firing sound 154 void setFireSound(const std::string& soundPath, const float soundVolume = 1.0); 155 const std::string& getFireSound(); 156 void playFireSound(); 157 158 // Interacting with the reloading sound 159 void setReloadSound(const std::string& soundPath, const float soundVolume = 1.0); 160 const std::string& getReloadSound(); 161 void playReloadSound(); 162 157 163 virtual void fire() = 0; 158 164 … … 188 194 Quaternion muzzleOrientation_; 189 195 190 WorldSound* defSndWpnFire_; 191 bool bSoundAttached_; 196 std::string fireSoundPath_; // The path of the sound played when fireing 197 float fireSoundVolume_; // The volume of the sound played when fireing 198 std::vector<WorldSound*> fireSounds_; // List of sounds used by the weapon mode. Because multiple sounds may overlap, we need mor than one WorldSound instance. 199 std::string reloadSoundPath_; // The path of the sound played when reloading 200 float reloadSoundVolume_; // The volume of the sound played when reloading 201 WorldSound* reloadSound_; 192 202 }; 193 203 }
Note: See TracChangeset
for help on using the changeset viewer.