Stash half-assed work on testing scene
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user