public bool Consume(eResource r, int amount) { if (stock[r] >= amount) { stock[r] -= amount; return(true); } return(false); }
public Sprite GetResource(eResource resource) { int id = (int)resource; if (id > resourceIcon.Length) { return(defaultSprite); } return(resourceIcon[id]); }
public int Add(eResource r, int amount) { stock[r] += amount; return(stock[r]); }
public int Get(eResource r) { return(stock[r]); }
public string ResourceLabel(eResource value) { return(ResourceListLabel[(int)value]); }
public string ResourceField(eResource value) { return(ResourceList[(int)value]); }
public Ingredient(eResource r, int a) { resource = r; amount = a; }