Ejemplo n.º 1
0
 public void UpdateText()
 {
     canvas.enabled   = true;
     foodText.text    = string.Format("x{0}", caravan.NumberOfFood());
     whiskeyText.text = string.Format("x{0}", caravan.NumberOfWhiskey());
     goodsText.text   = string.Format("x{0}", caravan.NumberOfGoods());
 }
Ejemplo n.º 2
0
    public void SelectItem(Item item)
    {
        if (item is Food)
        {
            if (caravan.NumberOfFood() > 0)
            {
                itemSelected = item;
            }
        }

        else if (item is Whiskey)
        {
            if (caravan.NumberOfWhiskey() > 0)
            {
                itemSelected = item;
            }
        }
    }