Ejemplo 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 IIdeal2State());
     }
 }
Ejemplo n.º 2
0
 public void Execute()
 {
     if (!animator.GetCurrentAnimatorStateInfo(0).IsName("Enemy1_fall") && !animator.GetCurrentAnimatorStateInfo(0).IsName("Enemy1_damage"))
     {
         if (enemy.ifELeft())
         {
             animator.SetFloat("Velocity", 0);
             animator.SetBool("isblastanim", true);
             enemy.StartCoroutine(enemy.blast(3));
         }
     }
     enemy.ChangeState(new IIdeal2State());
 }
Ejemplo n.º 3
0
    private void Ideal()
    {
        //goes to walking after ideal duration
        enemy.Animator.SetFloat("Velocity", 0);


        idealTimer += Time.deltaTime;

        if (idealTimer > difficultyUtils.idealDuration)
        {
            enemy.ChangeState(new IWalk2State());
        }
    }
Ejemplo n.º 4
0
    private void Walk()
    {
        //goes to ideal after walk duration
        walkTimer  += Time.deltaTime;
        blastTimer += Time.deltaTime;

        if (blastTimer > difficultyUtils.blastCooldown)
        {
            enemy.ChangeState(new IBlast2State());
        }

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

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