Update pages to follow new card flow

This commit is contained in:
Michal Pikulski
2025-11-17 10:59:59 +01:00
parent 7aca1a17ac
commit ee07d89d3e
13 changed files with 2287 additions and 194 deletions

View File

@@ -56,16 +56,20 @@ namespace UI.CardSystem.StateMachine
protected override void OnDragStartedHook()
{
base.OnDragStartedHook();
// Always emit the generic drag started event - consumers can decide what to do
context?.NotifyDragStarted();
string current = GetCurrentStateName();
if (current == "PendingFaceDownState")
{
// Notify AlbumViewPage to assign data & flip
var albumPage = FindObjectOfType<AlbumViewPage>();
if (albumPage != null)
// Let the state handle the flip transition
var pendingState = GetStateComponent<States.CardPendingFaceDownState>("PendingFaceDownState");
if (pendingState != null)
{
albumPage.HandlePendingCardDragStart(this);
pendingState.OnDragStarted();
}
// State change will be triggered by album page after data assignment
}
else
{