Exemplo 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 IIdeal3State());
     }
 }
Exemplo n.º 2
0
    private void Walk()
    {
        //goes to ideal after walk duration
        walkTimer  += Time.deltaTime;
        blastTimer += Time.deltaTime;

        if (blastTimer > difficultyUtils.bigblastCooldown)
        {
            enemy.ChangeState(new IBlast3State());
        }

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

        //check for
        if (enemy.InMeleeRange())
        {
            enemy.ChangeState(new IAttack3State());
        }
    }
Exemplo n.º 3
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());
         }
     }
     enemy.ChangeState(new IIdeal3State());
 }
Exemplo n.º 4
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 IWalk3State());
        }
    }