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,4 +1,5 @@
using AppleHills.Data.CardSystem;
using System;
using AppleHills.Data.CardSystem;
using Core.SaveLoad;
using UnityEngine;
@@ -29,6 +30,18 @@ namespace UI.CardSystem.StateMachine
public bool IsNewCard { get; set; }
public int RepeatCardCount { get; set; }
// Events for external coordination (BoosterOpeningPage, etc.)
public event Action<CardContext> OnFlipComplete;
public event Action<CardContext> OnCardDismissed;
public event Action<CardContext> OnCardInteractionComplete;
public event Action<CardContext> OnUpgradeTriggered;
// Helper methods for states
public void FireFlipComplete() => OnFlipComplete?.Invoke(this);
public void FireCardDismissed() => OnCardDismissed?.Invoke(this);
public void FireCardInteractionComplete() => OnCardInteractionComplete?.Invoke(this);
public void FireUpgradeTriggered() => OnUpgradeTriggered?.Invoke(this);
private void Awake()
{
// Auto-find components if not assigned