Changeset 9230 in orxonox.OLD for branches/presentation/src
- Timestamp:
- Jul 5, 2006, 2:06:28 PM (19 years ago)
- Location:
- branches/presentation/src/world_entities/space_ships
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/space_ships/helicopter.cc
r8783 r9230 43 43 ->addMethod("getAbsCoorY", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorY)) 44 44 ->addMethod("getAbsCoorZ", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorZ)) 45 45 46 46 ); 47 47 … … 124 124 void Helicopter::init() 125 125 { 126 this->chopperBuffer = NULL; 127 126 128 this->setClassID(CL_HELICOPTER, "Helicopter"); 127 128 129 PRINTF(4)("HELICOPTER INIT\n"); 129 130 -
branches/presentation/src/world_entities/space_ships/helicopter.h
r8783 r9230 39 39 40 40 virtual void process(const Event &event); 41 41 42 42 virtual void moveUp(bool move){bAscend = move;}; 43 43 virtual void moveDown(bool move){bDescend = move;}; … … 78 78 float airViscosity; 79 79 80 OrxSound::SoundSource soundSource;81 OrxSound::SoundBuffer* chopperBuffer;80 OrxSound::SoundSource soundSource; 81 OrxSound::SoundBuffer* chopperBuffer; 82 82 83 83 }; -
branches/presentation/src/world_entities/space_ships/hover.cc
r9129 r9230 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 "state.h" … … 43 45 ->addMethod("getAbsCoorZ", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorZ)) 44 46 ); 45 47 46 48 /** 47 49 * destructs the hover, deletes alocated memory … … 68 70 69 71 this->loadParams(doc.RootElement()); 72 73 //load sound 74 if (this->hoverBuffer != NULL) 75 ResourceManager::getInstance()->unload(this->hoverBuffer); 76 this->hoverBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/engine/hover.wav", WAV); 77 70 78 } 71 79 … … 107 115 void Hover::init() 108 116 { 117 118 this->hitEntity = NULL; 119 this->hoverBuffer = NULL; 120 109 121 // this->setRelDir(Quaternion(M_PI, Vector(1,0,0))); 110 122 this->setClassID(CL_HOVER, "Hover"); … … 216 228 State::getCameraNode()->setRelCoorSoft(-10, 0,0); 217 229 State::getCameraTargetNode()->setParentSoft(&this->cameraNode); 230 231 this->soundSource.play(this->hoverBuffer, 0.3f, true); 232 218 233 } 219 234 -
branches/presentation/src/world_entities/space_ships/hover.h
r7346 r9230 7 7 #ifndef _HOVER_H 8 8 #define _HOVER_H 9 10 #include "sound_buffer.h" 11 #include "sound_source.h" 9 12 10 13 #include "playable.h" … … 68 71 float airViscosity; 69 72 70 WorldEntity* hitEntity; 73 WorldEntity* hitEntity; 74 75 OrxSound::SoundSource soundSource; 76 OrxSound::SoundBuffer* hoverBuffer; 71 77 }; 72 78
Note: See TracChangeset
for help on using the changeset viewer.