- Timestamp:
- May 19, 2016, 5:34:38 PM (9 years ago)
- Location:
- code/branches/plehmannFS16/src/orxonox/controllers/scriptTasks
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/plehmannFS16/src/orxonox/controllers/scriptTasks/MoveToTask.cc
r11187 r11190 49 49 this->entity_ = this->player_->getControllableEntity(); 50 50 this->destination_ = destination; 51 this->velocity_ = velocity; 51 52 this->entity->setVelocity( Vector3(0,0,0) ) 52 53 } … … 55 56 { 56 57 58 float dl = this->velocity_ * dt; 57 59 60 58 61 /* Set the position to the correct place in the trajectory */ 59 62 this->entity_->setPosition( (1-dl)*startpos + dl * this->currentEvent.v1); -
code/branches/plehmannFS16/src/orxonox/controllers/scriptTasks/MoveToTask.h
r11187 r11190 62 62 vector3 destination_; 63 63 64 float velocity_; 65 64 66 }; 65 67 } -
code/branches/plehmannFS16/src/orxonox/controllers/scriptTasks/Task.cc
r11183 r11190 38 38 RegisterClass(Task); 39 39 40 Task::Task(Context* context) 40 Task::Task(Context* context) : BaseObject(context) 41 41 { 42 42 RegisterObject(Task); … … 49 49 } 50 50 51 bool Task::update(float dt)52 {53 SUPER(Task, tick, dt);54 }55 56 51 } -
code/branches/plehmannFS16/src/orxonox/controllers/scriptTasks/Task.h
r11183 r11190 32 32 #include "infos/PlayerInfo.h" 33 33 #include "tools/interfaces/Tickable.h" 34 #include "core/class/OrxonoxClass.h" 34 //#include "core/class/OrxonoxClass.h" 35 #include "core/BaseObject.h" 35 36 36 37 namespace orxonox 37 38 { 38 class _OrxonoxExport Task : public OrxonoxClass{39 class _OrxonoxExport Task : public BaseObject { 39 40 40 41 public: … … 46 47 47 48 //important return true while the task is running and false to stop it!!! 48 virtual bool update(float dt) ;49 virtual bool update(float dt) {return false;} 49 50 50 51 float getStartTime()
Note: See TracChangeset
for help on using the changeset viewer.