private void Impact(Ship ship, Planet planet) { Player player = (ship.Player.Number == 1) ? this.player1 : this.player2; this.particleSystem.Particles.Add(player.ExplosionEffect.Explode(ship.Center)); ship.Die(); player.ScoreCard.Suicides++; }
private void DamageShip(Ship ship, float points) { ship.Shields -= points; if (ship.Shields <= 0) { ship.Die(); if (ship.Player.Number == 1) { this.player1.ScoreCard.Defeats++; this.player2.ScoreCard.Kills++; this.particleSystem.Particles.Add(this.player1.ExplosionEffect.Explode(this.player1.Ship.Center)); } else { this.player2.ScoreCard.Defeats++; this.player1.ScoreCard.Kills++; this.particleSystem.Particles.Add(this.player2.ExplosionEffect.Explode(this.player2.Ship.Center)); } } }