Example #1
0
 void Start()
 {
     state = BuckAIState.HIDING;
     agent = GetComponent <NavMeshAgent> ();
     Goat  = FindClosestGoat().transform;
     if (moveTo == null)
     {
         moveTo = getRandomMoveTo();
     }
 }
Example #2
0
    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;
        }
    }