- Timestamp:
- Dec 3, 2009, 9:36:22 PM (15 years ago)
- Location:
- code/branches/presentation2/src/orxonox/controllers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc
r6223 r6236 69 69 controlMode_ = 0; 70 70 acceleration_ = 0; 71 accelerati on_ = false;71 accelerating_ = false; 72 72 firemode_ = -1; 73 73 showArrows_ = true; 74 showOverlays_ = false; 74 75 75 76 //currentPitch_ = 1; … … 129 130 NewHumanController::localController_s = this; 130 131 131 controlPaused_ = true;132 controlPaused_ = false; 132 133 133 134 //HumanController::localController_s->getControllableEntity()->getCamera()->setDrag(true); … … 169 170 170 171 if ( this->controlMode_ == 0 || ( this->controlMode_ == 1 && this->firemode_ == 1 ) ) 171 alignArrows(); 172 { 173 if ( this->showOverlays_ ) 174 alignArrows(); 175 } 172 176 else 173 177 hideArrows(); 174 175 this->crossHairOverlay_->show();176 this->centerOverlay_->show();177 178 } 178 }179 else {180 this->crossHairOverlay_->hide();181 this->centerOverlay_->hide();182 183 hideArrows();184 179 } 185 180 … … 384 379 this->currentYaw_ = 0; 385 380 this->currentPitch_ = 0; 386 // if (this->getControllableEntity() && this->getControllableEntity()->getIdentifier()->getName() == "SpaceShip") { 387 // this->doResumeControl(); 388 // } 381 if (this->getControllableEntity() && this->getControllableEntity()->getIdentifier()->getName() == "SpaceShip") 382 { 383 this->showOverlays_ = true; 384 if( !this->controlPaused_ ) 385 { 386 this->showOverlays(); 387 this->alignArrows(); 388 } 389 } 390 else 391 { 392 this->showOverlays_ = false; 393 this->hideOverlays(); 394 } 389 395 } 390 396 … … 407 413 void NewHumanController::doResumeControl() { 408 414 this->controlPaused_ = false; 409 this->crossHairOverlay_->show(); 410 this->centerOverlay_->show(); 415 if( this->showOverlays_ ) { 416 this->showOverlays(); 417 } 411 418 } 412 419 413 420 void NewHumanController::doPauseControl() { 414 421 this->controlPaused_ = true; 415 416 this->crossHairOverlay_->hide(); 417 this->centerOverlay_->hide(); 418 419 hideArrows(); 422 423 this->hideOverlays(); 420 424 } 421 425 … … 447 451 } 448 452 } 453 } 454 455 void NewHumanController::showOverlays() { 456 this->crossHairOverlay_->show(); 457 this->centerOverlay_->show(); 458 459 if (showArrows_) { 460 this->arrowsOverlay1_->show(); 461 this->arrowsOverlay2_->show(); 462 this->arrowsOverlay3_->show(); 463 this->arrowsOverlay4_->show(); 464 } 465 } 466 467 void NewHumanController::hideOverlays() { 468 this->crossHairOverlay_->hide(); 469 this->centerOverlay_->hide(); 470 471 this->hideArrows(); 449 472 } 450 473 -
code/branches/presentation2/src/orxonox/controllers/NewHumanController.h
r6210 r6236 68 68 void updateTarget(); 69 69 void alignArrows(); 70 void showOverlays(); 71 void hideOverlays(); 70 72 void hideArrows(); 71 73 … … 87 89 int firemode_; 88 90 bool showArrows_; 91 bool showOverlays_; 89 92 ClassTreeMask targetMask_; 90 93 };
Note: See TracChangeset
for help on using the changeset viewer.