示例#1
0
    public void Gather(ResourceType type, float amount)
    {
        ResourceValue resource = resolveType(type);

        if (resource.CanGather(amount))
        {
            resource.Gather(amount);
        }
    }
示例#2
0
 public bool Spend(ObjectDefinition definition)
 {
     return(minerals.Spend(definition.CostMinerals) && gas.Spend(definition.CostGas) && supplies.Gather(definition.CostSupplies));
 }