- Timestamp:
- Nov 14, 2018, 10:01:05 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/WorldMap_HS18/src/orxonox/controllers/StoryModeController.cc
r12060 r12101 36 36 RegisterClass(StoryModeController); 37 37 38 StoryModeController::StoryModeController(Context* context) : ArtificialController(context)38 StoryModeController::StoryModeController(Context* context) : Pawn(context) 39 39 { 40 40 RegisterObject(StoryModeController); 41 this->setAccuracy(100); 41 moveRight_ = false; 42 moveLeft_ = false; 43 //this->setAccuracy(50); 42 44 } 43 45 44 46 StoryModeController::~StoryModeController() 45 47 { 46 for (WorldEntity* waypoint : this->waypoints_)48 /*for (WorldEntity* waypoint : this->waypoints_) 47 49 { 48 50 if(waypoint) 49 51 waypoint->destroy(); 50 } 52 }*/ 53 51 54 } 52 55 53 56 void StoryModeController::tick(float dt) 54 57 { 55 if (!this->isActive()) 58 orxout(internal_error) << "Hi" << endl; 59 60 /*if (!this->isActive()) 56 61 return; 57 62 … … 59 64 return; 60 65 61 if (false /* this->waypoints_[this->currentWaypoint_]->getWorldPosition().squaredDistance(this->getControllableEntity()->getPosition()) <= this->squaredaccuracy_*/ )62 this->currentWaypoint_ = (this->currentWaypoint_ + 1) % this->waypoints_.size();66 if (false /* this->waypoints_[this->currentWaypoint_]->getWorldPosition().squaredDistance(this->getControllableEntity()->getPosition()) <= this->squaredaccuracy_*///) 67 //this->currentWaypoint_ = (this->currentWaypoint_ + 1) % this->waypoints_.size(); 63 68 64 69 //this->moveToPosition(this->waypoints_[this->currentWaypoint_]->getWorldPosition()); 65 70 } 66 71 72 void StoryModeController::moveFrontBack(const Vector2& value) 73 { 74 orxout(internal_error) << "FrontBack" << endl; 75 76 77 } 78 void StoryModeController::moveRightLeft(const Vector2& value) 79 { 80 orxout(internal_error) << "RightLeft" << endl; 81 if (value.x>0){ 82 moveRight_ =false; 83 moveLeft_ =true; 84 85 } 86 87 } 88 89 void StoryModeController::rotateYaw(const Vector2& value){} 90 void StoryModeController::rotatePitch(const Vector2& value){} 91 void StoryModeController::rotateRoll(const Vector2& value){} 92 void StoryModeController::fire(unsigned int a){} 93 void StoryModeController::fired(unsigned int b){} 94 void StoryModeController::boost(bool bBoost){} 67 95 }
Note: See TracChangeset
for help on using the changeset viewer.