Beispiel #1
0
    public void OnPointerExit(PointerEventData eventData)
    {
        if (eventData.CheckForNull())
        {
            GetCardDrop(eventData);

            if (cardDrop &&
                cardDrop.GameManager.IsMyTurn &&
                cardDrop.defaultTempCardParent == transform)
            {
                cardDrop.defaultTempCardParent = cardDrop.defaultParent;
            }
        }
    }
Beispiel #2
0
    public void OnPointerEnter(PointerEventData eventData)
    {
        // Check that the cursor is dragging the card,
        // the field is not the opponent's field,
        // the opponent's hand, the player's handы
        if (eventData.CheckForNull() &&
            fieldTipe != FieldTipe.ENEMY_FIELD &&
            fieldTipe != FieldTipe.ENEMY_HAND &&
            fieldTipe != FieldTipe.MY_HAND)
        {
            GetCardDrop(eventData);

            if (cardDrop && cardDrop.GameManager.IsMyTurn)
            {
                cardDrop.defaultTempCardParent = transform; // Assigning a parent to a temporary card
            }
        }
    }