Beispiel #1
0
    public void ItemClick()
    {
        int id = ItemUIScript.idClicked;

        if (!isActiveStorageUI)
        {
            return;
        }
        _currentIDSelected = id;
        if (_myStateBag == STATE_BAG.SHOW_EQUIP)//item hợp lệ
        {
            _itemInfor.SetData(_myItemEquipments[id], _myItems[_currentIDSelected]._iconImg.sprite);
            _itemInfor.SetState(StateInforItem.SelectEquipment);
        }
        else if (_myStateBag == STATE_BAG.SHOW_LUCKYMATERIAL)
        {
            _itemInfor.SetData(_myItemLuckyMaterials[id], _myItems[_currentIDSelected]._iconImg.sprite);
            _itemInfor.SetState(StateInforItem.SelectItem);
        }
        else if (_myStateBag == STATE_BAG.SHOW_RUNESTONE)
        {
            _itemInfor.SetData(_myRunestones[id], _myItems[_currentIDSelected]._iconImg.sprite);
            _itemInfor.SetState(StateInforItem.SelectItem);
        }
    }
Beispiel #2
0
    public void ItemUIScript_OnItemClicked()
    {
        int id = ItemUIScript.idClicked;

        if (!isActive)
        {
            return;
        }
        if (id >= _myEquipItems.Count)
        {
            Debug.Log("The nao day"); return;
        }

        _lastIndexSelected = id;
        if (_itemInfor._myState == StateInforItem.ShowInforEquipment || _itemInfor._myState == StateInforItem.ReplaceEquipment)
        {
            _itemInfor.SetDataNewEquipment(_myEquipItems[id], _myItems[id]._iconImg.sprite);
            _itemInfor.SetState(StateInforItem.ReplaceEquipment);
        }
        else
        {
            _itemInfor.SetData(_myEquipItems[id], _myItems[id]._iconImg.sprite);
            _itemInfor.SetState(StateInforItem.UseEquipment);
        }
    }
Beispiel #3
0
 public void ShowMaterialRunstone()
 {
     if (_itemRuneMaterial != null)
     {
         _itemInfor.SetData(_itemRuneMaterial, _materialRunestoneImg.sprite);
         _itemInfor.SetState(StateInforItem.ShowInForItem);
     }
 }
Beispiel #4
0
    public void ItemClick()
    {
        int id = ItemUIScript.idClicked;

        if (_filterBag.activeSelf)
        {
            return;
        }
        if (!isActiveStorageUI)
        {
            return;
        }
        idItemSelected = id;
        if (idTabSelected == 0)//equipment
        {
            //_itemInfor._myState = StateInforItem.SelectEquipment;
            _itemInfor.SetData(SplitDataFromServe._listEquipmentInBag[id], _listSlotEquipment[id]._iconImg.sprite);
            _itemInfor.SetState(StateInforItem.SellEquipment);
        }
        else if (idTabSelected == 1)//item
        {
            int _currentId = int.Parse(SplitDataFromServe._listItemInBag[id].getValue("idit").ToString());
            if (_listItemCanUse.Contains(_currentId))
            {
                isCanUse = true;
            }
            else
            {
                isCanUse = false;
            }
            if (!isCanUse)
            {
                _infoItemPanel.SetData(false, SplitDataFromServe._listItemInBag[id], _listSlotItem[id]._iconImg.sprite);
            }
            else
            {
                _itemInfor.SetData(SplitDataFromServe._listItemInBag[id], _listSlotItem[id]._iconImg.sprite);
                _itemInfor.SetState(StateInforItem.SellItem);
            }
        }
        else if (idTabSelected == 2)//runestone
        {
            _infoItemPanel.SetData(true, SplitDataFromServe._listGemInBag[id], _listSlotGem[id]._iconImg.sprite);
        }
    }
Beispiel #5
0
    public void ShowInforUpgrade()
    {
        if (isRollingInforce)
        {
            return;
        }
        if (_mainEquip == null)
        {
            return;
        }
        _myBag.LoadEquipment(0);

        _itemInfor.SetData(_mainEquip, _myItemUI._iconImg.sprite);
        _itemInfor.SetDataNewEquipment(_newEquipAfterUpgrade, _myItemUI._iconImg.sprite);
        _itemInfor.SetState(StateInforItem.CompareEquipment);
    }
    public void BtnClick(int id)
    {
        switch (id)
        {
        case 0:    //Btn MainEqquip
            if (_mainEquip != null)
            {
                _itemInfor.SetData(_mainEquip, _myItemUI._iconImg.sprite);
                _itemInfor.SetState(StateInforItem.None);
            }
            break;

        case 1:     //Btn 1 slot
            break;
        }
    }