Beispiel #1
0
 private void ProcessBossHit(DamageDeal damageDeal)
 {
     bossHealth -= damageDeal.GetDamage();
     damageDeal.Hit();
     if (bossHealth <= 0)
     {
         Die();
         PlayEnemyDestroySFX();
     }
 }
Beispiel #2
0
 private void ProcessHit(DamageDeal damageDeal)
 {
     health -= damageDeal.GetDamage();
     damageDeal.Hit();
     if (health <= 0)
     {
         Die();
         PlayPlayerDestroySFX();
     }
 }