コード例 #1
0
ファイル: ResourceResolver.cs プロジェクト: cmvanb/VRJam2017
    public void Gather(ResourceType type, float amount)
    {
        ResourceValue resource = resolveType(type);

        if (resource.CanGather(amount))
        {
            resource.Gather(amount);
        }
    }
コード例 #2
0
ファイル: ResourceResolver.cs プロジェクト: cmvanb/VRJam2017
 public bool CanAfford(ObjectDefinition definition)
 {
     return(minerals.CanSpend(definition.CostMinerals) && gas.CanSpend(definition.CostGas) && supplies.CanGather(definition.CostSupplies));
 }