Changeset 1406 for code/branches/network/src/orxonox/objects/SpaceShip.cc
- Timestamp:
- May 24, 2008, 1:39:05 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/orxonox/objects/SpaceShip.cc
r1398 r1406 75 75 return NULL; 76 76 } 77 77 78 78 SpaceShip::SpaceShip() : 79 79 //testvector_(0,0,0), … … 118 118 this->setConfigValues(); 119 119 120 initialDir_ = Vector3(1.0, 0.0, 0.0); 121 currentDir_ = initialDir_; 122 initialOrth_ = Vector3(0.0, 0.0, 1.0); 123 currentOrth_ = initialOrth_; 120 124 121 125 this->setRotationAxis(1, 0, 0); … … 233 237 CameraHandler::getInstance()->requestFocus(cam_); 234 238 239 } 240 241 Camera* SpaceShip::getCamera(){ 242 return cam_; 235 243 } 236 244 … … 318 326 } 319 327 328 Vector3 SpaceShip::getDir() { 329 return currentDir_; 330 } 331 332 Vector3 SpaceShip::getOrth(){ 333 return currentOrth_; 334 } 335 320 336 float SpaceShip::getMaxSpeed() { return maxSpeed_; } 321 337 322 338 void SpaceShip::tick(float dt) 323 339 { 340 currentDir_ = getOrientation()*initialDir_; 341 currentOrth_ = getOrientation()*initialOrth_; 342 324 343 if (this->cam_) 325 344 this->cam_->tick(dt); … … 341 360 if (this->bLMousePressed_ && this->timeToReload_ <= 0) 342 361 { 343 362 344 363 Projectile *p = new Projectile(this); 345 364 346 365 p->setBacksync(true); 347 366 this->timeToReload_ = this->reloadTime_;
Note: See TracChangeset
for help on using the changeset viewer.