Fix up card flows, align with the old 1:1

This commit is contained in:
Michal Pikulski
2025-11-12 10:55:00 +01:00
committed by Michal Pikulski
parent a6471ede45
commit 39d5890db4
15 changed files with 2033 additions and 479 deletions

View File

@@ -1,14 +1,14 @@
using Core.SaveLoad;
using UnityEngine;
using UnityEngine.EventSystems;
namespace UI.CardSystem.StateMachine.States
{
/// <summary>
/// Revealed state - card is flipped and visible, waiting for interaction.
/// Can be clicked to enlarge or dragged to place in album.
/// Revealed state - card is flipped and visible at normal size.
/// This is the "waiting" state:
/// - In booster flow: waiting for all cards to finish before animating to album
/// - In album placement flow: waiting to be dragged to a slot
/// </summary>
public class CardRevealedState : AppleState, IPointerClickHandler
public class CardRevealedState : AppleState
{
private CardContext _context;
@@ -19,14 +19,9 @@ namespace UI.CardSystem.StateMachine.States
public override void OnEnterState()
{
// Card is simply visible and interactable
// No special animations needed
}
public void OnPointerClick(PointerEventData eventData)
{
// Click to enlarge
_context.StateMachine.ChangeState("EnlargedNewState");
// Card is at normal size, fully revealed
// Fire interaction complete event (for BoosterOpeningPage tracking)
_context.FireCardInteractionComplete();
}
}
}