Changeset 8138 for code/branches/gameimmersion/src/orxonox
- Timestamp:
- Mar 28, 2011, 3:13:04 PM (14 years ago)
- Location:
- code/branches/gameimmersion/src/orxonox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gameimmersion/src/orxonox/graphics/Camera.cc
r8079 r8138 48 48 CreateFactory(Camera); 49 49 50 Camera::Camera(BaseObject* creator) : StaticEntity(creator) 50 //Camera::Camera(BaseObject* creator) : StaticEntity(creator) 51 Camera::Camera(BaseObject* creator) : MovableEntity(creator) 51 52 { 52 53 RegisterObject(Camera); -
code/branches/gameimmersion/src/orxonox/graphics/Camera.h
r8079 r8138 36 36 #include "tools/interfaces/Tickable.h" 37 37 #include "tools/interfaces/TimeFactorListener.h" 38 #include "worldentities/StaticEntity.h" 38 //#include "worldentities/StaticEntity.h" 39 #include "worldentities/MovableEntity.h" 39 40 40 41 namespace orxonox 41 42 { 42 class _OrxonoxExport Camera : public StaticEntity, public Tickable, public TimeFactorListener, public WindowEventListener 43 //class _OrxonoxExport Camera : public StaticEntity, public Tickable, public TimeFactorListener, public WindowEventListener 44 class _OrxonoxExport Camera : public MovableEntity, public TimeFactorListener, public WindowEventListener 43 45 { 44 46 friend class CameraManager; -
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.