public void OnPointerEnter(PointerEventData eventData)
    {
        sectorScript = this;
        invenGridManager.highlightedSlot = slotParent;
        PosOffset();
        if (ItemScript.selectedItem != null)
        {
            invenGridManager.RefreshColor(true);
        }
        if (parentSlotScript.storedItemObject != null && ItemScript.selectedItem == null)
        {
            invenGridManager.ColorChangeLoop(SlotColorHighlights.Blue, parentSlotScript.storedItemSize, parentSlotScript.storedItemStartPos);
        }

        if (parentSlotScript.storedItemObject != null)
        {
            overlayScript.UpdateOverlay(parentSlotScript.storedItemClass);
        }
    }
Ejemplo n.º 2
0
 //*** rework the add item to list
 // make a proper add item to list with sort and filter in mind
 // TODO : 우클릭 시에 원래자리로 돌아가도록 인벤그리드매니저에 추가.
 private void Update()
 {
     if (Input.GetMouseButtonDown(1) && invenManager.selectedButton != null) //right click to return item to list if item is from list
     {
         invenManager.RefreshColor(false);
         invenManager.selectedButton.GetComponent <CanvasGroup>().alpha = 1f;
         invenManager.selectedButton = null;
         itemEquipPool.ReturnObject(ItemScript.selectedItem);
         ItemScript.ResetSelectedItem();
     }
 }