public void OnPointerExit(PointerEventData eventData)
        {
            var cardModel = CardModel.GetPointerDrag(eventData);

            if (cardModel != null && cardModel.DropTarget == this)
            {
                cardModel.DropTarget = null;
            }
        }
Пример #2
0
        public void OnPointerExit(PointerEventData eventData)
        {
            CardModel cardModel = CardModel.GetPointerDrag(eventData);

            if (cardModel != null && cardModel.PlaceHolderCardZone == this)
            {
                cardModel.PlaceHolderCardZone = null;
            }
            OnLayout?.Invoke();
        }
Пример #3
0
        public void OnPointerEnter(PointerEventData eventData)
        {
            CardModel cardModel = CardModel.GetPointerDrag(eventData);

            if (cardModel != null && (type != CardZoneType.Area || cardModel.transform.parent != transform) &&
                !cardModel.IsStatic)
            {
                cardModel.PlaceHolderCardZone = this;
            }
        }
        public void OnPointerEnter(PointerEventData eventData)
        {
            var cardModel = CardModel.GetPointerDrag(eventData);

            if (cardModel == null)
            {
                return;
            }

            cardModel.DropTarget    = this;
            cardModel.HighlightMode = HighlightMode.Off;
        }
        public void OnDrop(PointerEventData eventData)
        {
            var cardModel = CardModel.GetPointerDrag(eventData);

            if (cardModel == null ||
                cardModel.ParentCardZone != null && cardModel.ParentCardZone.type != CardZoneType.Area ||
                cardModel.PlaceHolderCardZone != null && cardModel.PlaceHolderCardZone.type != CardZoneType.Area)
            {
                return;
            }

            var drawerViewer = DropHandler as DrawerViewer;

            if (drawerViewer != null && Index != null)
            {
                drawerViewer.AddCard(cardModel.Value, Index ?? 0);
            }
            else
            {
                DropHandler.OnDrop(cardModel);
            }
        }
Пример #6
0
 public void OnDrop(PointerEventData eventData)
 {
     CardModel cardModel = CardModel.GetPointerDrag(eventData);
     if (cardModel != null && cardModel.PlaceHolder == null && cardModel.ParentCardStack == null)
         dropHandler.OnDrop(cardModel);
 }
Пример #7
0
 public void OnPointerEnter(PointerEventData eventData)
 {
     CardModel cardModel = CardModel.GetPointerDrag(eventData);
     if (cardModel != null)
         cardModel.DropTarget = this;
 }