- Timestamp:
- Nov 21, 2016, 3:55:43 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/QuestGuide_HS16/src/modules/waypoints/Waypointarrow.cc
r11287 r11298 19 19 // model->setOrientation(Vector3(0,0,-1)); 20 20 model->setPosition(Vector3(0,15,0)); 21 waypoints_ = nullptr; 21 22 22 23 } … … 26 27 } 27 28 29 /* 30 Waypoint* WaypointGroup::getActive(){ 31 for (Waypoint* object : this->waypoints_){ 32 if(!(object->waypoint_actived)){ 33 object->enable_waypoint(); 34 return object; 35 } 36 } 37 } 38 39 40 void tick::getActive 41 */ 42 43 44 WaypointGroup* Waypointarrow::getWaypointgroup() 45 { 46 if (waypoints_ == nullptr){ 47 48 for (WaypointGroup* group : ObjectList<WaypointGroup>()) 49 waypoints_ = group; 50 51 } 52 53 return waypoints_; 54 } 55 56 57 58 59 void Waypointarrow::tick(float dt){ 28 60 61 if (getWaypointgroup() == nullptr){ 62 orxout() << "Second" << endl; 29 63 64 return; 65 } 66 67 waypoints_ = getWaypointgroup(); 68 69 waypoint = waypoints_->getActive(); 70 71 Vector3 waypoint_position = waypoint->getWorldPosition(); 72 73 orxout() << "dsfsf" << waypoint_position.x << endl; 74 model->lookAt(waypoint_position - this->getWorldPosition()); 75 76 77 } 30 78 31 79 void Waypointarrow::XMLPort(Element& xmlelement, XMLPort::Mode mode){ 32 80 SUPER(Waypointarrow, XMLPort, xmlelement, mode); // From the SpaceShip.cc file 81 33 82 //XMLPortParamTemplate(WorldEntity, "orientation", setOrientation, getOrientation, xmlelement, mode, Vector3) 34 83
Note: See TracChangeset
for help on using the changeset viewer.