示例#1
0
 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);
 }
示例#2
0
 public int GetCountOfResourcesType(ResourcesManager.ResourcesType resourcesType)
 {
     return(resourcesItems.Where(a => a.GetResourcesType() == resourcesType).ToArray().Length);
 }