Пример #1
0
    public void Gather(ResourceType type, float amount)
    {
        ResourceValue resource = resolveType(type);

        if (resource.CanGather(amount))
        {
            resource.Gather(amount);
        }
    }
Пример #2
0
 public bool CanAfford(ObjectDefinition definition)
 {
     return(minerals.CanSpend(definition.CostMinerals) && gas.CanSpend(definition.CostGas) && supplies.CanGather(definition.CostSupplies));
 }