示例#1
0
    public void TakeDamage(int damage)
    {
        if (damageSound != null)
        {
            damageSound.Play();
        }
        if (playerLife.GetIsInvencible())
        {
            playerLife.SetPlayerLife(damage);
        }

        DamageEvent.Invoke();
    }