Changeset 8516 in orxonox.OLD for branches/bsp_model
- Timestamp:
- Jun 16, 2006, 2:53:00 AM (19 years ago)
- Location:
- branches/bsp_model/src/world_entities/npcs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/world_entities/npcs/generic_npc.cc
r8515 r8516 23 23 #include "interactive_model.h" 24 24 #include "md2/md2Model.h" 25 26 #include "sound_buffer.h" 27 28 #include "loading/resource_manager.h" 25 29 26 30 #include "generic_npc.h" … … 61 65 this->setClassID(CL_GENERIC_NPC, "GenericNPC"); 62 66 this->toList(OM_GROUP_00); 67 68 if (this->soundBuffer != NULL) 69 ResourceManager::getInstance()->unload(this->soundBuffer); 70 this->soundBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/rain.wav", WAV); 63 71 } 64 72 -
branches/bsp_model/src/world_entities/npcs/generic_npc.h
r8515 r8516 11 11 12 12 #include <string> 13 // 14 #include "sound_source.h" 13 15 16 namespace OrxSound{ class SoundSource; } 17 namespace OrxSound{ class SoundBuffer; } 14 18 15 19 class TiXmlElement; … … 26 30 27 31 void setAnimation(int animationIndex, int animPlaybackMode); 32 /** sets the sound volume to @param vol: volume of the sound */ 33 inline void setVolume(float vol) { this->soundVolume = vol; } 28 34 29 35 bool playAnimation(int animationIndex, int animPlaybackMode); … … 37 43 38 44 private: 39 45 OrxSound::SoundSource soundSource; 46 OrxSound::SoundBuffer* soundBuffer; 47 float soundVolume; 40 48 }; 41 49
Note: See TracChangeset
for help on using the changeset viewer.