IEnumerator WanderState() // wander around the waypoints
 {
     print("Wander: Enter");
     while (state == PreyState.Wander)
     {
         PreyWander();
         if (ChangeState == false)
         {
             state = PreyState.Wander;
         }
         MovePrey(PreyWaypoints[index].transform.position);
         yield return(0);
     }
     print("Wander: Exit");
     NextState();
 }
Exemple #2
0
 public void SetCurrentState(PreyState newState) //oldschool setter
 {
     currentState = newState;
 }