public static Boom FromShip(Ship ship) { if (ship.World.Hook.BoomLife > 0) { var boom = new Boom(ship.World); boom.Size = ship.Size; boom.Position = ship.Position; boom.LinearVelocity = ship.LinearVelocity; return(boom); } else { return(null); } }
public static Boom FromShip(Ship ship) { if (ship.World.Hook.BoomLife > 0) { var boom = new Boom(); boom.Init(ship.World); boom.Size = ship.Size; boom.Position = ship.Position; boom.Momentum = ship.Momentum; return(boom); } else { return(null); } }
public void Die(Player player, Fleet fleet, ShipWeaponBullet bullet) { if (player != null) { World.Scoring.ShipDied(player, this.Fleet?.Owner, this); } fleet?.KilledShip(this); base.Die(); if (!(this.GetType() == typeof(Fish)) && !this.Abandoned) { Boom.FromShip(this); } if (this.Fleet != null) { this.Fleet.ShipDeath(player, this, bullet); } }