- Timestamp:
- Jan 24, 2007, 7:44:32 PM (18 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/sound_entity.cc
r10321 r10351 40 40 this->soundSource.setSourceNode(this); 41 41 42 if( root != NULL) 43 this->loadParams(root); 44 42 45 this->thunderBuffer = OrxSound::ResourceSoundBuffer("sounds/atmosphere/thunder.wav"); 43 46 } … … 50 53 { 51 54 } 55 56 57 /** 58 * loading stuff 59 * @param root xml element 60 */ 61 void SoundEntity::loadParams(const TiXmlElement* root) 62 { 63 LoadParam(root, "soundfile", this, SoundEntity, setSoundFile) 64 .describe("Sets the file of the sound source"); 65 66 LoadParam(root, "frequency", this, SoundEntity, setSoundFile) 67 .describe("Sets the file of the sound source"); 68 } 69 70 71 /** 72 * sets the sound file 73 * @param fileName name of the sound source 74 */ 75 void SoundEntity::setSoundFile(const std::string fileName) 76 { 77 this->soundBuffer = OrxSound::ResourceSoundBuffer(fileName); 78 } 79 52 80 53 81 void SoundEntity::activate() -
trunk/src/world_entities/sound_entity.h
r10321 r10351 26 26 virtual ~SoundEntity (); 27 27 28 virtual void loadParams(const TiXmlElement* root); 29 30 void setSoundFile(const std::string fileName); 31 28 32 virtual void activate(); 29 33 virtual void deactivate(); … … 34 38 35 39 OrxSound::SoundSource soundSource; 36 OrxSound::SoundBuffer thunderBuffer;40 OrxSound::SoundBuffer soundBuffer; 37 41 }; 38 42
Note: See TracChangeset
for help on using the changeset viewer.