public ResourceCollection(ResourceCollection rc) { resources = new int[Enum.GetValues(typeof(ResourceType)).Length - 1]; AddResources(rc); }
public bool HasEnough(ResourceCollection rc) => resources.Where((resource, i) => resource < rc.resources[i]).Any() == false;
public void SpendResources(ResourceCollection collection) { storedResources.TrySpendResource(collection); OnResourceChange?.Invoke(); }