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(); }
public void SetCurrentState(PreyState newState) //oldschool setter { currentState = newState; }