Exemple #1
0
 private void Start()
 {
     if (itemStack != null)
     {
         itemImage.texture  = itemStack.data.itemInHUD;
         stackNumberUI.text = itemStack.sizeStack.ToString();
     }
     if (fromSlot != null)
     {
         rectTransform.anchoredPosition = fromSlot.GetComponent <RectTransform> ().anchoredPosition;
         inSlot = true;
     }
 }
Exemple #2
0
 public void setSlot(SlotUI newSlot)
 {
     if (fromSlot != null)
     {
         fromSlot.removeCurrentItem();
     }
     if (newSlot != null)
     {
         rectTransform.SetParent(newSlot.GetComponent <RectTransform> ().parent, false);
     }
     fromSlot = newSlot;
 }