Exemplo n.º 1
0
 public override void FireEffect(int fireCount)
 {
     foreach (ResourceValue resourceValue in productionValues.GetValues())
     {
         Resource resource = resourceValue.resource;
         resource.Value += (resourceValue.value * fireCount);
     }
 }
Exemplo n.º 2
0
    public override int CanFire(int fireCount)
    {
        int toReturn = fireCount;

        foreach (ResourceValue resourceValue in productionValues.GetValues())
        {
            Resource resource = resourceValue.resource;
            toReturn = Mathf.Min(resourceValue.resource.Space / resourceValue.value, fireCount);
        }

        return(toReturn);
    }