public void OnPointerExit(PointerEventData eventData) { if (eventData.pointerDrag == null) { return; } CardMovScript card = eventData.pointerDrag.GetComponent <CardMovScript>(); if (card && card.DefaultTempCardParent == transform) { card.DefaultTempCardParent = card.DefaultParent; } }
public void OnPointerEnter(PointerEventData eventData) { if (eventData.pointerDrag == null) { return; } CardMovScript card = eventData.pointerDrag.GetComponent <CardMovScript>(); if (card) { card.DefaultTempCardParent = transform; } //Debug.Log(" 2 " + transform.name); }
public void OnDrop(PointerEventData eventData) { CardMovScript card = eventData.pointerDrag.GetComponent <CardMovScript>(); if (card) { if (card.ThreeFormation) { if (card.CanMoveToSubField(transform, 1) && card.CanTakeFromSubField(card.PrevParent)) { card.DefaultParent = transform; } } else { card.DefaultParent = transform; } } //Debug.Log(" 1 " + transform.name); }