Changeset 6387 for code/branches/presentation2/src/orxonox/controllers
- Timestamp:
- Dec 21, 2009, 1:18:36 PM (14 years ago)
- Location:
- code/branches/presentation2/src/orxonox/controllers
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/orxonox/controllers/ArtificialController.cc
r6164 r6387 46 46 this->bHasTargetPosition_ = false; 47 47 this->targetPosition_ = Vector3::ZERO; 48 48 49 49 this->target_.setCallback(createFunctor(&ArtificialController::targetDied, this)); 50 50 } … … 143 143 this->targetPosition_ = getPredictedPosition(this->getControllableEntity()->getPosition(), hardcoded_projectile_speed, this->target_->getPosition(), this->target_->getVelocity()); 144 144 this->bHasTargetPosition_ = (this->targetPosition_ != Vector3::ZERO); 145 145 146 146 Pawn* pawn = dynamic_cast<Pawn*>(this->getControllableEntity()); 147 147 if (pawn) -
code/branches/presentation2/src/orxonox/controllers/ArtificialController.h
r5929 r6387 42 42 ArtificialController(BaseObject* creator); 43 43 virtual ~ArtificialController(); 44 44 45 45 void abandonTarget(Pawn* target); 46 46 -
code/branches/presentation2/src/orxonox/controllers/Controller.h
r6356 r6387 51 51 52 52 virtual inline void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage) {}; 53 53 54 54 void setGodMode( bool mode ){ this->bGodMode_ = mode; } 55 55 bool getGodMode(){ return this->bGodMode_; } -
code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc
r6377 r6387 140 140 arrowsOverlay1_->setPosition(Vector2(0.5, 0.5)); 141 141 arrowsOverlay1_->hide(); 142 142 143 143 arrowsOverlay2_ = new OrxonoxOverlay(this); 144 144 arrowsOverlay2_->setBackgroundMaterial("Orxonox/DirectionArrows2"); … … 147 147 arrowsOverlay2_->setPosition(Vector2(0.5, 0.5)); 148 148 arrowsOverlay2_->hide(); 149 149 150 150 arrowsOverlay3_ = new OrxonoxOverlay(this); 151 151 arrowsOverlay3_->setBackgroundMaterial("Orxonox/DirectionArrows3"); … … 154 154 arrowsOverlay3_->setPosition(Vector2(0.5, 0.5)); 155 155 arrowsOverlay3_->hide(); 156 156 157 157 arrowsOverlay4_ = new OrxonoxOverlay(this); 158 158 arrowsOverlay4_->setBackgroundMaterial("Orxonox/DirectionArrows4"); … … 502 502 { 503 503 hideArrows(); 504 504 505 505 float distance = sqrt(pow(static_cast<float>(this->currentYaw_)/2*-1,2) + pow(static_cast<float>(this->currentPitch_)/2*-1,2)); 506 506 507 507 if (distance > 0.04 && distance <= 0.59 * arrowsSize_ / 2.0 ) 508 508 {
Note: See TracChangeset
for help on using the changeset viewer.