Stash half-assed work on testing scene
This commit is contained in:
@@ -15,7 +15,6 @@ namespace UI.CardSystem.StateMachine.States
|
||||
public class CardEnlargedRepeatState : AppleState, IPointerClickHandler
|
||||
{
|
||||
[Header("State-Owned Visuals")]
|
||||
[SerializeField] private GameObject progressBarContainer;
|
||||
[SerializeField] private ProgressBarController progressBar;
|
||||
|
||||
private CardContext _context;
|
||||
@@ -35,21 +34,11 @@ namespace UI.CardSystem.StateMachine.States
|
||||
_originalScale = _context.RootTransform.localScale;
|
||||
_waitingForTap = false;
|
||||
|
||||
// Show progress bar container
|
||||
if (progressBarContainer != null)
|
||||
{
|
||||
progressBarContainer.SetActive(true);
|
||||
}
|
||||
|
||||
// Enlarge the card
|
||||
if (_context.Animator != null)
|
||||
{
|
||||
_context.Animator.PlayEnlarge(_settings.NewCardEnlargedScale);
|
||||
}
|
||||
|
||||
// Show progress with blink animation
|
||||
// Show progress bar
|
||||
if (progressBar != null)
|
||||
{
|
||||
progressBar.gameObject.SetActive(true);
|
||||
|
||||
int currentCount = _context.RepeatCardCount + 1; // +1 because we just got this card
|
||||
int maxCount = _settings.CardsToUpgrade;
|
||||
|
||||
@@ -60,6 +49,12 @@ namespace UI.CardSystem.StateMachine.States
|
||||
Logging.Warning("[CardEnlargedRepeatState] ProgressBar component not assigned!");
|
||||
OnProgressComplete();
|
||||
}
|
||||
|
||||
// Enlarge the card
|
||||
if (_context.Animator != null)
|
||||
{
|
||||
_context.Animator.PlayEnlarge(_settings.NewCardEnlargedScale);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnProgressComplete()
|
||||
@@ -170,9 +165,9 @@ namespace UI.CardSystem.StateMachine.States
|
||||
_context.IsNewCard = true;
|
||||
|
||||
// Hide progress bar before transitioning
|
||||
if (progressBarContainer != null)
|
||||
if (progressBar != null)
|
||||
{
|
||||
progressBarContainer.SetActive(false);
|
||||
progressBar.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
// Transition to EnlargedNewState (card is already enlarged, will show NEW badge)
|
||||
@@ -205,9 +200,9 @@ namespace UI.CardSystem.StateMachine.States
|
||||
private void OnDisable()
|
||||
{
|
||||
// Hide progress bar when leaving state
|
||||
if (progressBarContainer != null)
|
||||
if (progressBar != null)
|
||||
{
|
||||
progressBarContainer.SetActive(false);
|
||||
progressBar.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user