public void OnPointerClick(PointerEventData eventData)
 {
     if (eventData.button == PointerEventData.InputButton.Left)
     {
         if (swapManager.HasAttachedSwappable())
         {
             // move attached item to this empty slot
             swapManager.SwapPositions(SlotIndex, null, SlotsHandler);
         }
     }
 }
Exemple #2
0
 public void OnPointerClick(PointerEventData eventData)
 {
     if (eventData.button == PointerEventData.InputButton.Left)
     {
         if (movementManager.HasAttachedSwappable())
         {
             // swap the positions of the attached swappable with this one.
             movementManager.SwapPositions(Swappable.SlotIndex, Swappable);
         }
         else
         {
             // set the attached swappable to be this.
             movementManager.SetAttachedSwappable(Swappable);
         }
     }
 }