private void Drop(BaseItemSlot tranferItemSlot) { if (dragItemSlot == null) { return; } if (tranferItemSlot.CanReceiveItem(dragItemSlot.ITEM) && dragItemSlot.CanReceiveItem(tranferItemSlot.ITEM)) { SwapItems(tranferItemSlot); } }
private void Drop(int index, BaseItemSlot dropItemSlot) { if (_draggedItemSlot == null) { return; } if (dropItemSlot.CanAddStack(_draggedItemSlot.Item) || (dropItemSlot.CanReceiveItem(_draggedItemSlot.Item) && _draggedItemSlot.CanReceiveItem(dropItemSlot.Item))) { InvokeServerRpc(ChangeItemSlots, _draggedItemSlotIndex, _draggedItemSlot.GetType().ToString(), index, dropItemSlot.GetType().ToString()); } }
private void Drop(BaseItemSlot dropItemSlot) { if (dragItemSlot == null) { return; } if (dropItemSlot.CanAddStack(dragItemSlot.Item)) { AddStacks(dropItemSlot); } else if (dropItemSlot.CanReceiveItem(dragItemSlot.Item) && dragItemSlot.CanReceiveItem(dropItemSlot.Item)) { SwapItems(dropItemSlot); } }
void Drop(BaseItemSlot _itemSlot) { if (dragItemSlot == null) { return; //만약 drop한 슬롯에 아무도 없으면 반환, drag한 건 전부다 되돌려진다 } if (_itemSlot.CanAddStack(dragItemSlot.Item)) { AddStacks(_itemSlot); } else if (_itemSlot.CanReceiveItem(dragItemSlot.Item) && dragItemSlot.CanReceiveItem(_itemSlot.Item)) // 처음 dragSlot과 dropSlot 둘다 아이템이 들어갈 수 있다면 { SwapItem(_itemSlot); } // 마지막으로 drag한 아이템슬롯 = _itemSlot, 처음 drag를 시작 아이템슬록 = dragItemSlot }
// chedk this out down > probably not relevant now private void Drop(BaseItemSlot dropItemSlot) { if (dragItemSlot == null) { return; } if (dropItemSlot.CanAddStack(dragItemSlot.Item)) { AddStacks(dropItemSlot); SoundManager.Instance.PlaySFX(buttonClickSFX, 1); } else if (dropItemSlot.CanReceiveItem(dragItemSlot.Item) && dragItemSlot.CanReceiveItem(dropItemSlot.Item)) { SwapItems(dropItemSlot); SoundManager.Instance.PlaySFX(buttonClickSFX, 1); } }
private void Drop(UISlot dropUISlot) { if (dropUISlot is BaseItemSlot) { BaseItemSlot dropItemSlot = dropUISlot as BaseItemSlot; if (dragItemSlot == null) { return; } if (dropItemSlot.CanAddStack(dragItemSlot.Item)) { AddStacks(dropItemSlot); } else if (dropItemSlot.CanReceiveItem(dragItemSlot.Item) && dragItemSlot.CanReceiveItem(dropItemSlot.Item)) { SwapItems(dropItemSlot); } } else if (dropUISlot is BaseSkillSlot) { BaseSkillSlot dropSkillSlot = dropUISlot as BaseSkillSlot; if (dragSkillSlot == null) { return; } if (dropSkillSlot is UsableSkillSlot) { ActiveSkill holdSkill = dragSkillSlot.Skill as ActiveSkill; if (dragSkillSlot is UsableSkillSlot) { SkillWindow.RemoveSkill(holdSkill); if (dropSkillSlot.Skill) { SkillWindow.EquipSkill(dropSkillSlot.Skill as ActiveSkill, 0, dragSkillSlot as UsableSkillSlot); } } SkillWindow.EquipSkill(holdSkill, 0, dropUISlot as UsableSkillSlot); } } }