コード例 #1
0
 public void OnEndDrag(PointerEventData eventData)
 {
     if (!currentCardDisplay.OnSlot && nearestCardSlot != null && nearestCardSlot.CanPutCard(currentCardDisplay))
     {
         DeckManager.instance.DeleteFromPlayer(currentCardDisplay);
         nearestCardSlot.CardDisplay = currentCardDisplay;
         nearestCardSlot.GetComponent <SpriteRenderer>().color = new Color(0, 0, 0, 0);
         AudioManager.PlaySound("cardPlace2");
         TransformHelper.SmoothMove(currentCardDisplay.transform, nearestCardSlot.transform.position);
     }
     else
     {
         TransformHelper.SmoothMove(currentCardDisplay.transform, startCoord);
     }
 }