Exemple #1
0
 void Start()
 {
     state = BullAIState.HIDING;
     agent = GetComponent <NavMeshAgent> ();
     cow   = FindClosestCow().transform;
     if (moveTo == null)
     {
         moveTo = getRandomMoveTo();
     }
 }
Exemple #2
0
    public void MakeDecision()
    {
        prevState = state;

        switch (state)
        {
        case BullAIState.IDLE:
            state = Idle();
            break;

        case BullAIState.HIDING:
            state = Hide();
            break;

        case BullAIState.CHASING:
            state = Chase();
            break;

        case BullAIState.HORNY:
            state = Horny();
            break;
        }
    }