public void Exit() { animal.ExitBusy(); water.StopEating(animal); animal.RestoreAgentState(ref agent); // Debug.Log(animal.name + " stopped eating"); }
public void Execute() { animal.UpdateEnergyLevel(Time.deltaTime * 2f); if (anim != null) { anim.Play(animationStr); } if (animal.GetEnergyLevel() >= 80f) { // No need to rest animal.ExitBusy(); //animal.GetStateMachine().SwtichToPreviousState(); animal.GetStateMachine().ChangeState(new WanderAround(agent, animal.GetSpeed(), animal)); } }
public void Exit() { animal.ExitBusy(); food.StopEating(animal); // animal.RestoreAgentState(ref agent); }