Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
        /// <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);
        }