Beyond_Beyaan.FleetManager.GetShipCount C# (CSharp) Метод

GetShipCount() публичный Метод

public GetShipCount ( Ship design ) : int
design Ship
Результат int
        public int GetShipCount(Ship design)
        {
            int amount = 0;
            //Gets the count of ships with this design in the empire
            foreach (var fleet in _fleets)
            {
                if (fleet.Ships.ContainsKey(design))
                {
                    amount += fleet.Ships[design];
                }
            }
            return amount;
        }