Esempio n. 1
0
 public void Execute()
 {
     if (!animator.GetCurrentAnimatorStateInfo(0).IsName("Enemy1_fall") && !animator.GetCurrentAnimatorStateInfo(0).IsName("Enemy1_damage"))
     {
         Attacc();
     }
     if (!enemy.InMeleeRange())
     {
         enemy.ChangeState(new IIdealState());
     }
 }
Esempio n. 2
0
    private void Walk()
    {
        //goes to ideal after walk duration
        walkTimer += Time.deltaTime;

        if (walkTimer > difficultyUtils.walkDuration)
        {
            enemy.ChangeState(new IIdealState());
        }

        //check for
        if (enemy.InMeleeRange())
        {
            enemy.ChangeState(new IAttackState());
        }
    }