public void Gather(ResourceType type, float amount) { ResourceValue resource = resolveType(type); if (resource.CanGather(amount)) { resource.Gather(amount); } }
public bool Spend(ObjectDefinition definition) { return(minerals.Spend(definition.CostMinerals) && gas.Spend(definition.CostGas) && supplies.Gather(definition.CostSupplies)); }