Beispiel #1
0
    public void RemoveShipFromStorage(Ship ship)
    {
        if (!ShipsInStorage.Contains(ship))
        {
            return;
        }

        ShipsInStorage.Remove(ship);

        onShipsInStorageChange?.Invoke();
    }
Beispiel #2
0
    public void RemoveSkyhook()
    {
        if (SkyhooksInStorage == 0)
        {
            return;
        }

        foreach (var storageItem in ShipsInStorage)
        {
            if (storageItem.shipType == ShipsDSID.Skyhook)
            {
                //TODO: make this a method
                ShipsInStorage.Remove(storageItem);
                SkyhooksInStorage--;
                onShipsInStorageChange?.Invoke();
                return;
            }
        }
    }