Changeset 6289 for code/branches/presentation2
- Timestamp:
- Dec 9, 2009, 2:43:47 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc
r6279 r6289 92 92 { 93 93 arrowsOverlay1_ = new OrxonoxOverlay(this); 94 arrowsOverlay1_->setBackgroundMaterial("Orxonox/ CenterOverlay");94 arrowsOverlay1_->setBackgroundMaterial("Orxonox/DirectionArrows1"); 95 95 arrowsOverlay1_->setSize(Vector2(0.02727, 0.36 * arrowsSize_)); 96 96 arrowsOverlay1_->setPickPoint(Vector2(0.5, 0.5)); … … 99 99 100 100 arrowsOverlay2_ = new OrxonoxOverlay(this); 101 arrowsOverlay2_->setBackgroundMaterial("Orxonox/ CenterOverlay");101 arrowsOverlay2_->setBackgroundMaterial("Orxonox/DirectionArrows2"); 102 102 arrowsOverlay2_->setSize(Vector2(0.02727, 0.59 * arrowsSize_)); 103 103 arrowsOverlay2_->setPickPoint(Vector2(0.5, 0.5)); … … 106 106 107 107 arrowsOverlay3_ = new OrxonoxOverlay(this); 108 arrowsOverlay3_->setBackgroundMaterial("Orxonox/ CenterOverlay");108 arrowsOverlay3_->setBackgroundMaterial("Orxonox/DirectionArrows3"); 109 109 arrowsOverlay3_->setSize(Vector2(0.02727, 0.77 * arrowsSize_)); 110 110 arrowsOverlay3_->setPickPoint(Vector2(0.5, 0.5)); … … 113 113 114 114 arrowsOverlay4_ = new OrxonoxOverlay(this); 115 arrowsOverlay4_->setBackgroundMaterial("Orxonox/ CenterOverlay");115 arrowsOverlay4_->setBackgroundMaterial("Orxonox/DirectionArrows4"); 116 116 arrowsOverlay4_->setSize(Vector2(0.02727, arrowsSize_)); 117 117 arrowsOverlay4_->setPickPoint(Vector2(0.5, 0.5)); … … 163 163 if( this->controllableEntity_ && !this->controllableEntity_->isInMouseLook() ) 164 164 { 165 if (this->getControllableEntity() && this->getControllableEntity()->getIdentifier()->getName() == "SpaceShip")166 this->showOverlays();167 165 this->updateTarget(); 166 168 167 if ( !controlPaused_ ) { 168 if (this->getControllableEntity() && this->getControllableEntity()->getIdentifier()->getName() == "SpaceShip") 169 this->showOverlays(); 170 169 171 this->crossHairOverlay_->setPosition(Vector2(static_cast<float>(this->currentYaw_)/2*-1+.5-overlaySize_/2, static_cast<float>(this->currentPitch_)/2*-1+.5-overlaySize_/2)); 170 172 171 173 if ( this->controlMode_ == 0 || ( this->controlMode_ == 1 && this->firemode_ == 1 ) ) 172 174 { 173 if ( this->showOverlays_ )175 if ( this->showOverlays_ && this->showArrows_) 174 176 alignArrows(); 175 177 } … … 421 423 void NewHumanController::doPauseControl() { 422 424 this->controlPaused_ = true; 423 425 424 426 this->hideOverlays(); 425 427 } … … 457 459 this->crossHairOverlay_->show(); 458 460 this->centerOverlay_->show(); 459 461 460 462 if (showArrows_) { 461 463 this->arrowsOverlay1_->show(); … … 469 471 this->crossHairOverlay_->hide(); 470 472 this->centerOverlay_->hide(); 471 473 472 474 this->hideArrows(); 473 475 }
Note: See TracChangeset
for help on using the changeset viewer.