Esempio n. 1
0
    void IEndDragHandler.OnEndDrag(PointerEventData eventData)
    {
        Vector3      destination = DragController.GetTouchWorldPosition(eventData.pointerId);
        RaycastHit2D hit2D;

        bool success = DragController.RaycastDetect(tagObject, destination, out hit2D);

        if (success)
        {
            PasteObject();
        }
        else
        {
            ReturnCandy();
        }
    }