WOrking card dragging, slotting, previewing

This commit is contained in:
Michal Pikulski
2025-11-07 12:51:45 +01:00
parent 77f7d1ee97
commit 32a477b843
9 changed files with 549 additions and 1288 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using AppleHills.Data.CardSystem;
using Pixelplacement;
using Pixelplacement.TweenSystem;
@@ -260,9 +260,12 @@ namespace UI.CardSystem
public void OnPointerClick(PointerEventData eventData)
{
Debug.Log($"[CLICK-TRACE-FLIPPABLE] OnPointerClick on {name}, _isClickable={_isClickable}, _isWaitingForTap={_isWaitingForTap}, _isFlipped={_isFlipped}, position={eventData.position}");
// If not clickable, notify and return
if (!_isClickable)
{
Debug.Log($"[CLICK-TRACE-FLIPPABLE] {name} - Not clickable, firing OnClickedWhileInactive");
OnClickedWhileInactive?.Invoke(this);
return;
}
@@ -270,14 +273,19 @@ namespace UI.CardSystem
// If waiting for tap after reveal, handle that
if (_isWaitingForTap)
{
Debug.Log($"[CLICK-TRACE-FLIPPABLE] {name} - Waiting for tap, dismissing enlarged state");
OnCardTappedAfterReveal?.Invoke(this);
_isWaitingForTap = false;
return;
}
if (_isFlipped || _isFlipping)
{
Debug.Log($"[CLICK-TRACE-FLIPPABLE] {name} - Ignoring click (flipped={_isFlipped}, flipping={_isFlipping})");
return;
}
Debug.Log($"[CLICK-TRACE-FLIPPABLE] {name} - Processing click, starting flip");
// Flip on click
FlipToReveal();
}