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