public Upgrade(string _name, string _tooltip, Ressources _cost, Ressources _modifier) { name = _name; tooltip = _tooltip; cost = _cost; modifier = _modifier; }
public Upgrade(string _name, string _tooltip, string _cost, string _modifier) { name = _name; tooltip = _tooltip; cost = new Ressources(_cost); modifier = new Ressources(_modifier); }
public void SubRessources(Ressources subtractor) { wood -= subtractor.wood; food -= subtractor.food; ore -= subtractor.ore; army -= subtractor.army; }
public void AddRessources(Ressources adder) { wood += adder.wood; food += adder.food; ore += adder.ore; army += adder.army; }
public Upgrade() { name = "no name"; tooltip = "no tooltip"; cost = new Ressources(); modifier = new Ressources(); }
public bool CanAfford(Ressources price) { if (ressources.food >= price.food && ressources.wood >= price.wood && ressources.ore >= price.ore && ressources.army >= price.army) { return(true); } else { return(false); } }
public Player(Ressources _ressources) { ressources = _ressources; }