Changeset 9235 in orxonox.OLD for trunk/src/world_entities/space_ships/hover.cc
- Timestamp:
- Jul 5, 2006, 4:39:02 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/space_ships/hover.cc
r8719 r9235 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" … … 34 36 CREATE_FACTORY(Hover, CL_HOVER); 35 37 38 #include "script_class.h" 39 CREATE_SCRIPTABLE_CLASS(Hover, CL_HOVER, 40 addMethod("hasPlayer", ExecutorLua0ret<Playable,bool>(&Playable::hasPlayer)) 41 //Coordinates 42 ->addMethod("setAbsCoor", ExecutorLua3<PNode,float,float,float>(&PNode::setAbsCoor)) 43 ->addMethod("getAbsCoorX", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorX)) 44 ->addMethod("getAbsCoorY", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorY)) 45 ->addMethod("getAbsCoorZ", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorZ)) 46 ); 47 36 48 /** 37 49 * destructs the hover, deletes alocated memory … … 40 52 { 41 53 this->setPlayer(NULL); 54 55 //if (this->hoverBuffer != NULL) 56 // ResourceManager::getInstance()->unload(this->hoverBuffer); 42 57 } 43 58 … … 58 73 59 74 this->loadParams(doc.RootElement()); 75 76 //load sound 77 //if (this->hoverBuffer != NULL) 78 // ResourceManager::getInstance()->unload(this->hoverBuffer); 79 //this->hoverBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/engine/hover.wav", WAV); 80 60 81 } 61 82 … … 97 118 void Hover::init() 98 119 { 120 121 //this->hitEntity = NULL; 122 //this->hoverBuffer = NULL; 123 99 124 // this->setRelDir(Quaternion(M_PI, Vector(1,0,0))); 100 125 this->setClassID(CL_HOVER, "Hover"); … … 112 137 this->cameraLook = 0.0f; 113 138 this->rotation = 0.0f; 114 this->acceleration = 25.0f;139 this->acceleration = 15.0f; 115 140 this->airFriction = 3.0f; 116 141 … … 206 231 State::getCameraNode()->setRelCoorSoft(-10, 0,0); 207 232 State::getCameraTargetNode()->setParentSoft(&this->cameraNode); 233 234 //this->soundSource.play(this->hoverBuffer, 0.3f, true); 235 208 236 } 209 237
Note: See TracChangeset
for help on using the changeset viewer.