void Start() { state = BuckAIState.HIDING; agent = GetComponent <NavMeshAgent> (); Goat = FindClosestGoat().transform; if (moveTo == null) { moveTo = getRandomMoveTo(); } }
public void MakeDecision() { prevState = state; switch (state) { case BuckAIState.IDLE: state = Idle(); break; case BuckAIState.HIDING: state = Hide(); break; case BuckAIState.CHASING: state = Chase(); break; case BuckAIState.HORNY: state = Horny(); break; } }