Fix up card flows, align with the old 1:1
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user