Changeset 8138 for code/branches/gameimmersion/src/orxonox/worldentities
- Timestamp:
- Mar 28, 2011, 3:13:04 PM (14 years ago)
- Location:
- code/branches/gameimmersion/src/orxonox/worldentities/pawns
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gameimmersion/src/orxonox/worldentities/pawns/SpaceShip.cc
r7860 r8138 36 36 #include "core/XMLPort.h" 37 37 #include "items/Engine.h" 38 #include "graphics/Camera.h" 39 #include "CameraManager.h" 38 40 39 41 namespace orxonox … … 76 78 this->setConfigValues(); 77 79 this->registerVariables(); 80 81 Camera* c = CameraManager::getInstance().getActiveCamera(); 82 this->cameraOriginalPosition = c->getPosition(); 83 this->cameraOriginalOrientation = c->getOrientation(); 78 84 } 79 85 … … 152 158 if(this->bBoost_) 153 159 { 160 Camera* c = CameraManager::getInstance().getActiveCamera(); 154 161 this->boostPower_ -=this->boostRate_*dt; 155 162 if(this->boostPower_ <= 0.0f) … … 158 165 this->bBoostCooldown_ = true; 159 166 this->timer_.setTimer(this->boostCooldownDuration_, false, createExecutor(createFunctor(&SpaceShip::boostCooledDown, this))); 167 168 c->setVelocity(0,0,0); 169 c->setPosition(this->cameraOriginalPosition); 170 c->setOrientation(this->cameraOriginalOrientation); 160 171 } 172 else 173 { 174 //Kamera schuettelt 175 COUT(1) << "Afterburner effect\n"; 176 if (c != 0) 177 { 178 c->setVelocity(0.1, 2.0, 0.3); 179 } 180 } 161 181 } 162 182 } -
code/branches/gameimmersion/src/orxonox/worldentities/pawns/SpaceShip.h
r7801 r8138 114 114 Engine* engine_; 115 115 Timer timer_; 116 Vector3 cameraOriginalPosition; 117 Quaternion cameraOriginalOrientation; 116 118 }; 117 119 }
Note: See TracChangeset
for help on using the changeset viewer.