Refactor, cleanup code and add documentaiton

This commit is contained in:
Michal Pikulski
2025-11-18 09:29:59 +01:00
parent 034654c308
commit cf13fb78b5
100 changed files with 689 additions and 537 deletions

View File

@@ -0,0 +1,51 @@
using System;
namespace UI.CardSystem.StateMachine
{
/// <summary>
/// Booster-specific card context for reveal flow coordination.
/// Separated from generic CardContext to maintain single responsibility.
/// </summary>
public class BoosterCardContext
{
// Booster reveal workflow state
private bool _hasCompletedReveal = false;
/// <summary>
/// Has this card completed its booster reveal flow?
/// </summary>
public bool HasCompletedReveal => _hasCompletedReveal;
/// <summary>
/// Suppress NEW/REPEAT badges in revealed state
/// </summary>
public bool SuppressRevealBadges { get; set; } = false;
/// <summary>
/// Event fired when reveal flow is complete (card dismissed)
/// </summary>
public event Action OnRevealFlowComplete;
/// <summary>
/// Signal that this card has completed its reveal flow
/// </summary>
public void NotifyRevealComplete()
{
if (!_hasCompletedReveal)
{
_hasCompletedReveal = true;
OnRevealFlowComplete?.Invoke();
}
}
/// <summary>
/// Reset reveal state (for card reuse/pooling)
/// </summary>
public void Reset()
{
_hasCompletedReveal = false;
SuppressRevealBadges = false;
}
}
}