Changeset 7810 in orxonox.OLD for trunk/src/world_entities/space_ships
- Timestamp:
- May 24, 2006, 3:57:04 PM (19 years ago)
- Location:
- trunk/src/world_entities/space_ships
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/space_ships/helicopter.cc
r7337 r7810 25 25 26 26 #include "util/loading/factory.h" 27 #include "util/loading/resource_manager.h" 28 27 29 #include "key_mapper.h" 28 30 #include "event_handler.h" … … 49 51 { 50 52 this->setPlayer(NULL); 53 54 if (this->chopperBuffer != NULL) 55 ResourceManager::getInstance()->unload(this->chopperBuffer); 51 56 } 52 57 … … 96 101 this->getWeaponManager().changeWeaponConfig(1); 97 102 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false); 103 104 //load sound 105 if (this->chopperBuffer != NULL) 106 ResourceManager::getInstance()->unload(this->chopperBuffer); 107 this->chopperBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/chopper.wav", WAV); 108 98 109 } 99 110 … … 205 216 State::getCameraNode()->setParentSoft(this->getWeaponManager().getFixedTarget()); 206 217 State::getCameraTargetNode()->setParentSoft(this->getWeaponManager().getFixedTarget()); 218 219 this->soundSource.loop(this->chopperBuffer); 220 // PRINTF(0)( "Playing ChopperSound\n" ); 207 221 } 208 222 … … 211 225 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false); 212 226 this->detachCamera(); 213 227 this->soundSource.stop(); 214 228 } 215 229 -
trunk/src/world_entities/space_ships/helicopter.h
r7346 r7810 10 10 #include "playable.h" 11 11 12 #include "sound_buffer.h" 13 #include "sound_source.h" 12 14 13 15 class Helicopter : public Playable … … 71 73 float airViscosity; 72 74 75 OrxSound::SoundSource soundSource; 76 OrxSound::SoundBuffer*chopperBuffer; 77 73 78 }; 74 79
Note: See TracChangeset
for help on using the changeset viewer.