Ejemplo n.º 1
0
 public void UnequipItem(InventorySlot inventorySlot)
 => InventoryService.Unequip(_equippedItemSlots[inventorySlot]);
Ejemplo n.º 2
0
 public void Cancel()
 {
     ViewerDisable();
     slot         = null;
     SelectWidget = Widget.NoSelect;
 }
Ejemplo n.º 3
0
 public void SetActiveSlot(InventorySlot inventorySlot)
 {
     Inventory.SetActiveSlot(null);
     _activeSlot = inventorySlot;
 }
Ejemplo n.º 4
0
 protected abstract void OnDisappear(PointerEventData eventData, InventorySlot slot); //비활성화 이벤트
 protected abstract void DrawContent(InventorySlot slot);                             //뷰어 내용 그리기 메서드
Ejemplo n.º 5
0
 protected override void OnDisappear(PointerEventData eventData, InventorySlot slot)
 {
 }
Ejemplo n.º 6
0
 protected abstract void EventCall();                                                 //이벤트 할당 메서드
 protected abstract void OnDisplay(PointerEventData eventData, InventorySlot slot);   //활성화 이벤트
Ejemplo n.º 7
0
 protected abstract void OnDisplay(PointerEventData eventData, InventorySlot slot);   //활성화 이벤트
 protected abstract void OnDisappear(PointerEventData eventData, InventorySlot slot); //비활성화 이벤트
Ejemplo n.º 8
0
 private void OnDragEnded(InventorySlot inventorySlot, Vector2 pointerPosition)
 {
     DraggingInventorySlot.GetComponent <InventorySlot>().SetMainSprite(null);
     DraggingInventorySlot.SetActive(false);
     DragEnded?.Invoke(inventorySlot, pointerPosition);
 }
Ejemplo n.º 9
0
 private void Drag(InventorySlot inventorySlot, Vector2 pointerPosition)
 {
     _draggingItemRect.localPosition = new Vector3(pointerPosition.x, pointerPosition.y) - _canvasRect.localPosition - _panelRect.localPosition;
 }
Ejemplo n.º 10
0
 private void DragStarted(InventorySlot inventorySlot, Vector2 pointerPosition)
 {
     DraggingInventorySlot.GetComponent <InventorySlot>().SetMainSprite(inventorySlot.MainSprite);
     DraggingInventorySlot.SetActive(true);
 }
Ejemplo n.º 11
0
 public int GetIndexOfInventorySlot(InventorySlot inventorySlot)
 => _inventorySlots.IndexOf(inventorySlot) + GetFirstItemIndex();
Ejemplo n.º 12
0
 public IItem GetItemOfInventorySlot(InventorySlot inventorySlot)
 => InventoryService.Get(GetIndexOfInventorySlot(inventorySlot));