public void CheckIfDestroyed() { if (HealthPoints <= 0 && !_destroyAnimationStarted) { _destroyAnimationStarted = true; var explosion = new ShipExplosion(Center); CurrentParticles.Add(explosion); explosion.AnimationFinished += (sender, args) => { Destroyed?.Invoke(this, null); }; //Destroyed?.Invoke(this,null); } }
public override void AddParticle(Particle particle) { CurrentParticles.Add(particle); }