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; } }
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); }; }
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; }
private void SetDragEndPos(EChickenBagType type, int index = 0) { endPos = type; Debug.Log("endPos:" + endPos); this.endIndex = index; }
private void DragBagItem(IBaseChickenBagItemData data, EChickenBagType type) { SetDragStartPos(type, data.key); }