Esempio n. 1
0
    public void setData(GameItem i, int slot, GameAlchemyUIBagType bt, GameAlchemyUIType t, int uid)
    {
        itemSlot = slot;
        bagType  = bt;
        type     = t;
        userID   = uid;

        clear();

        if (i == null)
        {
            return;
        }

        item = i;

        text.text = i.Name;

        if (type == GameAlchemyUIType.Bag)
        {
            userText.text = GameStringData.instance.getString(GameStringType.Bag0);
        }
        else
        {
            GameUnit unit = GameUnitData.instance.getData(userID);

            userText.text = unit.Name;
        }

        icon[(int)item.ItemType].gameObject.SetActive(true);
    }
Esempio n. 2
0
    public void setType(GameAlchemyUIBagType t)
    {
        switch (t)
        {
        case GameAlchemyUIBagType.Bag:
            text.text = GameStringData.instance.getString(GameStringType.AlchemyUI0);
            break;

        case GameAlchemyUIBagType.Alchemy:
            text.text = GameStringData.instance.getString(GameStringType.AlchemyUI1);
            break;
        }
    }