Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 21, 2016, 3:55:43 PM (7 years ago)
Author:
ooguz
Message:

Arrow movessvn add Waypoint.h!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/QuestGuide_HS16/src/modules/waypoints/WaypointGroup.cc

    r11287 r11298  
    1616    {
    1717        RegisterObject(WaypointGroup);
     18        activeWaypoint = nullptr;
     19
    1820        //model = new Model(this->getContext());
    1921        //model->setMeshSource("cube.mesh");  // Name of the arrow file for now bottle
     
    6062
    6163    Waypoint* WaypointGroup::getActive(){
    62           for (Waypoint* object : this->waypoints_){
     64          if (activeWaypoint == nullptr){
     65                                    orxout() << "OOOOOOOOOO" << endl;
     66
     67            activateNext();
     68
     69          }           
     70          return activeWaypoint;
     71    }
     72
     73    Waypoint* WaypointGroup::activateNext(){
     74        for (Waypoint* object : this->waypoints_){
    6375            if(!(object->waypoint_actived)){
    6476                object->enable_waypoint();
    65                 return object;
     77                activeWaypoint = object;
    6678            }
    6779        }
     80        return activeWaypoint;
    6881    }
    69 
    7082
    7183
Note: See TracChangeset for help on using the changeset viewer.