public override void FireEffect(int fireCount) { foreach (ResourceValue resourceValue in productionValues.GetValues()) { Resource resource = resourceValue.resource; resource.Value += (resourceValue.value * fireCount); } }
public override int CanFire(int fireCount) { int toReturn = fireCount; foreach (ResourceValue resourceValue in productionValues.GetValues()) { Resource resource = resourceValue.resource; toReturn = Mathf.Min(resourceValue.resource.Space / resourceValue.value, fireCount); } return(toReturn); }