/// <summary> /// add a new ship to this player's flotilla. /// </summary> public void AddShip(ShipData shipType) { FrameworkCore.PlayCue(sounds.Fanfare.ship); FleetShip ship = Helpers.AddFleetShip(FrameworkCore.players[0].campaignShips, shipType); //create popup. if (ship == null) { return; } ShipPopup popup = new ShipPopup(menuManager); popup.fleetShip = ship; menuManager.AddMenu(popup); }
/// <summary> /// add a random ship to this player's flotilla. /// </summary> public void AddShip(ShipData[] shipType, bool chanceToUpgrade) { FrameworkCore.PlayCue(sounds.Fanfare.ship); ShipData shipToAdd = shipType[FrameworkCore.r.Next(shipType.Length)]; if (chanceToUpgrade) { shipToAdd = UpgradeShip(shipToAdd); } FleetShip ship = Helpers.AddFleetShip(FrameworkCore.players[0].campaignShips, shipToAdd); //create popup. if (ship == null) { return; } ShipPopup popup = new ShipPopup(menuManager); popup.fleetShip = ship; menuManager.AddMenu(popup); }