예제 #1
0
        private void ShowTip(EChickenBagType type, int key, Transform root)
        {
            switch (type)
            {
            case EChickenBagType.Equipment: ShowEquipmentTip((Wardrobe)key, root); break;

            case EChickenBagType.WeaponPart: ShowWeaponPartTip(key / 10, key - 10 * (key / 10), root); break;

            case EChickenBagType.Weapon: ShowWeaponTip(key, root); break;
            }
        }
예제 #2
0
        private void InitItemEvent(UIItem item, EChickenBagType type)
        {
            var realItem = item as ChickenBagItem;

            if (realItem == null)
            {
                return;
            }
            realItem.RightClickCallback = UseItem;
            realItem.DragCallback       = (data) =>
            {
                DragBagItem(data, type);
            };
            realItem.EnterCallback = (bagItem) => { ShowTip(bagItem); };
        }
예제 #3
0
        private void SetDragStartPos(EChickenBagType type, string key)
        {
            startPos = type;
            Debug.Log("startPos:" + startPos);
            string endKey = (int)endPos + "|" + endIndex;

            dragKey = key;
            if (startPos == EChickenBagType.Bag && endPos == EChickenBagType.Ground && IsSplitInput())
            {
                _adapter.SendSplitItem(dragKey);
                return;
            }
            _adapter.SendDragItem(dragKey, endKey);
            endPos   = EChickenBagType.None;
            endIndex = 0;
        }
예제 #4
0
 private void SetDragEndPos(EChickenBagType type, int index = 0)
 {
     endPos = type;
     Debug.Log("endPos:" + endPos);
     this.endIndex = index;
 }
예제 #5
0
 private void DragBagItem(IBaseChickenBagItemData data, EChickenBagType type)
 {
     SetDragStartPos(type, data.key);
 }