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