示例#1
0
    private void EnemyAttack()
    {
        if (collider.IsTouching(filter2D))
        {
            spriteAnimator.AnimateAttack();

            if (timer >= delay && playerHealth.health >= 0f)
            {
                timer = 0f;
                playerHealth.TakeDamage(damage);
            }
        }
    }