예제 #1
0
 public void DropItemUponClose()
 {
     if (Hand.MyInstance.MyMoveable != null)
     {
         Debug.Log("The hand is holding something");
         if (!IsOpen)
         {
             Image icon = Hand.MyInstance.GetIcon();
             if (icon != null)
             {
                 if (fromSlot == null)
                 {
                     Debug.Log("fromSlot is null");
                 }
                 fromSlot.PutItemBack(); //This only makes the inventory icon white again
                 Hand.MyInstance.Drop(); //This makes moveable null
                 FromSlot = null;        //This makes the fromslot null
             }
         }
     }
 }