Exemple #1
0
    void TakeDamage(int damage)
    {
        CurrentHealth -= damage;

        Audio.PlayOneShot(HitSound);
        UpdateUI();

        if (CurrentHealth <= 0)
        {
            GameInformation.GameOver();
        }
    }