public override void DrawNonAuto()
{
if (shipState != ShipState.Dead)
{
if (CurrentHealth <= 0 && shipState != ShipState.Exploding)
{
shipState = ShipState.Exploding;
// ExplosionSFX.Play();
return;
}
else if (shipState == ShipState.Exploding)
{
if (StateManager.Options.SFXEnabled)
{
ExplosionSFX.Play();
}
_explosionSheet.Update();
Dead(this, EventArgs.Empty);
_explosionSheet.Position = this.Position;
_explosionSheet.DrawNonAuto();
if (_explosionSheet.IsComplete)
{
shipState = ShipState.Dead;
if (PlayerType == CoreTypes.PlayerType.Enemy || PlayerType == CoreTypes.PlayerType.Solo)
{
StateManager.EnemyShips.Remove(this);
}
else
{
StateManager.AllyShips.Remove(this);
}
}
return;
}
base.DrawNonAuto();
if (_hasHealthBar && (StateManager.ShowShipData || (this is BaseAllyShip && this.Cast<BaseAllyShip>().IsPlayerShip)))
{
_healthBar.DrawNonAuto();
}
if (engine != null)
{
engine.Draw();
}
}
}