Esempio n. 1
0
 private bool goOn(PathWaypoint target, bool success)
 {
     if (!target.onGoalReached(success))
     {
         this.currentTarget++;
         if (this.currentTarget >= this.waypoints.Count)
         {
             if (this.shouldLoopNextTime())
             {
                 this.currentTarget = 0;
             }
             else
             {
                 this.currentTarget = -1;
                 return(false);
             }
         }
     }
     return(true);
 }
Esempio n. 2
0
 public Path(EntityPathable entity, PathWaypoint goal, bool doesLoop, bool continueTryingWhenFailed) : this(entity, new[] { goal }, doesLoop, continueTryingWhenFailed)
 {
 }