public uint ressourceQuantity(GameRessources ressourcesName) { if (inventory.ContainsKey (ressourcesName)) { return inventory[ressourcesName]; } else { return 0; } }
public void addRessource(GameRessources ressourcesName, uint quantity) { if (inventory.ContainsKey (ressourcesName)) { inventory[ressourcesName] = inventory[ressourcesName] + quantity; } else { inventory[ressourcesName] = quantity; } }
public bool useRessource(GameRessources ressourcesName, uint quantity) { if (inventory.ContainsKey (ressourcesName)) { inventory[ressourcesName] = inventory[ressourcesName] - quantity; } else { inventory[ressourcesName] = 0; return false; } return true; }
public ItemStack(GameRessources g, int n, Button b) { gr = g; nb = n; but = b; }
public uint getRessourceQuantityInBase(GameRessources ressourcesName) { return rhb.ressourceQuantity (ressourcesName); }
public void addRessource(GameRessources ressourcesName, uint quantity) { rhb.addRessource (ressourcesName, quantity); }