Changeset 1021 for code/trunk/src/orxonox/objects/SpaceShip.cc
- Timestamp:
- Apr 10, 2008, 5:03:34 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/SpaceShip.cc
r978 r1021 39 39 #include "util/String2Number.h" 40 40 #include "util/Math.h" 41 #include "../core/CoreIncludes.h" 42 #include "../core/Debug.h" 43 #include "../Orxonox.h" 44 #include "../particle/ParticleInterface.h" 41 #include "core/CoreIncludes.h" 42 #include "core/Debug.h" 43 #include "Orxonox.h" 44 #include "InputHandler.h" 45 #include "particle/ParticleInterface.h" 45 46 #include "Projectile.h" 46 47 #include "core/XMLPort.h" … … 55 56 { 56 57 RegisterObject(SpaceShip); 58 this->registerAllVariables(); 57 59 58 60 this->setConfigValues(); … … 124 126 this->brakeLoop(loop); 125 127 */ 126 this->init(); 127 128 // this->create(); 129 130 128 131 COUT(3) << "Info: SpaceShip was loaded" << std::endl; 129 132 } … … 135 138 } 136 139 140 bool SpaceShip::create(){ 141 if(Model::create()) 142 this->init(); 143 else 144 return false; 145 return true; 146 } 147 148 void SpaceShip::registerAllVariables(){ 149 Model::registerAllVariables(); 150 151 152 153 } 154 137 155 void SpaceShip::init() 138 156 { … … 202 220 { 203 221 Model::loadParams(xmlElem); 222 this->create(); 204 223 /* 205 224 if (xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft")) … … 267 286 268 287 this->camNode_->attachObject(cam); 269 Orxonox::getSingleton()->getOgrePointer()->getR oot()->getAutoCreatedWindow()->addViewport(cam);288 Orxonox::getSingleton()->getOgrePointer()->getRenderWindow()->addViewport(cam); 270 289 } 271 290 … … 400 419 if (!this->setMouseEventCallback_) 401 420 { 402 if ( Orxonox::getSingleton()->getMouse())421 if (InputHandler::getSingleton()->getMouse()) 403 422 { 404 Orxonox::getSingleton()->getMouse()->setEventCallback(this);423 InputHandler::getSingleton()->getMouse()->setEventCallback(this); 405 424 this->setMouseEventCallback_ = true; 406 425 } … … 427 446 } 428 447 429 OIS::Keyboard* mKeyboard = Orxonox::getSingleton()->getKeyboard();430 OIS::Mouse* mMouse = Orxonox::getSingleton()->getMouse();448 OIS::Keyboard* mKeyboard = InputHandler::getSingleton()->getKeyboard(); 449 OIS::Mouse* mMouse = InputHandler::getSingleton()->getMouse(); 431 450 432 451 mKeyboard->capture();
Note: See TracChangeset
for help on using the changeset viewer.