Stash half-assed work on testing scene

This commit is contained in:
Michal Pikulski
2025-11-12 11:58:01 +01:00
parent a9f102b3c4
commit 6fd1a10eb6
18 changed files with 3065 additions and 321 deletions

View File

@@ -1,4 +1,5 @@
using Core.SaveLoad;
using UnityEngine;
namespace UI.CardSystem.StateMachine.States
{
@@ -7,9 +8,14 @@ namespace UI.CardSystem.StateMachine.States
/// 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
/// Shows small idle badges for NEW or REPEAT cards.
/// </summary>
public class CardRevealedState : AppleState
{
[Header("State-Owned Visuals")]
[SerializeField] private UnityEngine.GameObject newCardIdleBadge;
[SerializeField] private UnityEngine.GameObject repeatCardIdleBadge;
private CardContext _context;
private void Awake()
@@ -20,9 +26,43 @@ namespace UI.CardSystem.StateMachine.States
public override void OnEnterState()
{
// Card is at normal size, fully revealed
// Show appropriate idle badge
if (_context.IsNewCard)
{
if (newCardIdleBadge != null)
newCardIdleBadge.SetActive(true);
if (repeatCardIdleBadge != null)
repeatCardIdleBadge.SetActive(false);
}
else if (_context.RepeatCardCount > 0)
{
if (newCardIdleBadge != null)
newCardIdleBadge.SetActive(false);
if (repeatCardIdleBadge != null)
repeatCardIdleBadge.SetActive(true);
}
else
{
// Neither new nor repeat - hide both
if (newCardIdleBadge != null)
newCardIdleBadge.SetActive(false);
if (repeatCardIdleBadge != null)
repeatCardIdleBadge.SetActive(false);
}
// Fire interaction complete event (for BoosterOpeningPage tracking)
_context.FireCardInteractionComplete();
}
private void OnDisable()
{
// Hide badges when leaving state
if (newCardIdleBadge != null)
newCardIdleBadge.SetActive(false);
if (repeatCardIdleBadge != null)
repeatCardIdleBadge.SetActive(false);
}
}
}