Exemplo n.º 1
0
    public void Gather(ResourceType type, float amount)
    {
        ResourceValue resource = resolveType(type);

        if (resource.CanGather(amount))
        {
            resource.Gather(amount);
        }
    }
Exemplo n.º 2
0
 public bool CanAfford(ObjectDefinition definition)
 {
     return(minerals.CanSpend(definition.CostMinerals) && gas.CanSpend(definition.CostGas) && supplies.CanGather(definition.CostSupplies));
 }