public ResourcesItem[] GetAllResourcesOfType(ResourcesManager.ResourcesType resourcesType) { ResourcesItem[] resourcesItemsOfType = resourcesItems.Where(a => a.GetResourcesType() == resourcesType).ToArray(); resourcesItems = resourcesItems.Except <ResourcesItem>(resourcesItemsOfType.ToList()).ToList(); isFull = inventoryMaxCount <= resourcesItems.Count; if (isStorage) { ResourcesManager.instance.UpdateResourcesInfo(); } return(resourcesItemsOfType); }
public int GetCountOfResourcesType(ResourcesManager.ResourcesType resourcesType) { return(resourcesItems.Where(a => a.GetResourcesType() == resourcesType).ToArray().Length); }