Beispiel #1
0
 public static void Release()
 {
     if (instance._potentialSlot != null)
     {
         if (CheckIfMovePossible(instance._holdingSlot.gridLocation, instance._potentialSlot.gridLocation))
         {
             Vector2 tmpA = instance._holdingSlot.gridLocation;
             Vector2 tmpB = instance._potentialSlot.gridLocation;
             instance._holdingSlot.SetPosition(tmpB);
             instance._potentialSlot.SetPosition(tmpA);
         }
         else
         {
             instance._holdingSlot.transform.localPosition   = GetWorldPosition(instance._holdingSlot.gridLocation);
             instance._potentialSlot.transform.localPosition = GetWorldPosition(instance._potentialSlot.gridLocation);
         }
     }
     instance._holdingSlot.renderer.transform.localScale = Vector3.one * 5f;
     instance._holdingSlot       = null;
     instance._potentialSlot     = null;
     instance._mouseHoldStartPos = Vector3.zero;
     instance.CheckForDeletion();
 }