Exemplo n.º 1
0
    public void CleraInfo()
    {
        num = 0;
        inventoryItemDto = new InventoryItemDTO();
        numText.enabled  = false;
        InventoryItemUi go = GetComponentInChildren <InventoryItemUi>();

        if (go != null)
        {
            go.gameObject.SetActive(false);
            Knapsack._instance.ItemprefabPool.Push(go.gameObject);
        }
    }
Exemplo n.º 2
0
    public void SetInfo(InventoryItemDTO _itemDto)
    {
        inventoryItemDto = _itemDto;
        num = _itemDto.count;
        if (num > 1)
        {
            ShowNum();
        }
        if (_itemDto.inventoryGridId != gridId)
        {
            _itemDto.inventoryGridId = gridId;
            NetIO.Instance.Write(Protocol.Inventory, 0, InventoryProtocol.UpdateInventory_CREQ, _itemDto);
        }

        InventoryItemUi itemUi = GetComponentInChildren <InventoryItemUi>();

        itemUi.SetInfo(_itemDto);
    }