Exemplo n.º 1
0
    void FixedUpdate()
    {
        if (!enemyMovement.GetAggro() || playerHealth.currentHealth <= 0)
        {
            isAttacking = false;
            return;
        }
        if (!isAttacking && !blink.IsInv() && enemyHealth.currentHealth > 0)
        {
            StartCoroutine(Attack());
        }

        if (playerHealth.currentHealth <= 0)
        {
            anim.SetTrigger("PlayerDead");
        }
    }