Beispiel #1
0
    public async void OnDrop(PointerEventData eventData)
    {
        DraggableCard card = eventData.pointerDrag.GetComponent <DraggableCard>();

        card.transform.SetParent(HandsManager.Instance.myHand.transform, false);
        card.transform.SetSiblingIndex(card.placeholder.transform.GetSiblingIndex());

        card.DestroyPlaceholder();

        List <CardInfo> newHand = GetCardsFromHand();

        await HandsManager.Instance.SaveNewHand(PlayerPrefs.GetString("uid"), newHand);

        HandsManager.Instance.photonView.RPC(
            "UpdateHandUI",
            RpcTarget.All,
            PlayerPrefs.GetString("uid")
            );

        HandsManager.Instance.SetHandCardsRaycasts(true);
    }