protected void DamageAndUpdateBossHealth(int damage) { // If this boss is invulernable, exit if (Invulnerable) { return; } GameManager.Instance.SetHealthBarValue((float)Health / maxHealth); Health -= damage; // If the boss is dead but has a life left. if (Health <= 0 && Life > 0) { HandleLifeLoss(); } // Boss has no life left. else if (Health <= 0 && Life <= 0) { HandleBossDeath(); } else { currentSpell.ScaleSpell(damage); } }