public override void InflictDamage(GameObjectVertical obj) { if (obj.DisruptionTime > 0) { disruptionMilliseconds = obj.DisruptionTime; } float enemyDamage = obj.Damage; if (hasShield && currentShield > 0) { if (currentShield > enemyDamage) { currentShield -= enemyDamage; Game.AddGameObjToShooter(ShieldEffectGenerator.GenerateStandardShieldEffect(Game, spriteSheet, this)); if (!(obj is BeamBullet)) { Game.soundEffectsManager.PlaySoundEffect(SoundEffects.ShieldHit); } } else { HP -= (obj.Damage - Shield); Shield = 0; if (!(obj is BeamBullet)) { Game.soundEffectsManager.PlaySoundEffect(SoundEffects.MuffledExplosion); } } } else { base.OnDamage(); HP -= obj.Damage; } }