Stash work!
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using AppleHills.Data.CardSystem;
|
||||
using Core.SaveLoad;
|
||||
using UnityEngine;
|
||||
@@ -19,6 +19,9 @@ namespace UI.CardSystem.StateMachine
|
||||
[Header("Card Data")]
|
||||
private CardData cardData;
|
||||
|
||||
// Cached reference to AlbumViewPage (lazy-loaded)
|
||||
private AlbumViewPage _albumViewPage;
|
||||
|
||||
// Public accessors
|
||||
public CardDisplay CardDisplay => cardDisplay;
|
||||
public CardAnimator Animator => cardAnimator;
|
||||
@@ -26,8 +29,25 @@ namespace UI.CardSystem.StateMachine
|
||||
public Transform RootTransform => transform;
|
||||
public CardData CardData => cardData;
|
||||
|
||||
/// <summary>
|
||||
/// Get the AlbumViewPage instance (cached to avoid repeated FindFirstObjectByType calls)
|
||||
/// </summary>
|
||||
public AlbumViewPage AlbumViewPage
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_albumViewPage == null)
|
||||
{
|
||||
_albumViewPage = FindFirstObjectByType<AlbumViewPage>();
|
||||
}
|
||||
return _albumViewPage;
|
||||
}
|
||||
}
|
||||
|
||||
// Runtime state
|
||||
public bool IsClickable { get; set; } = true;
|
||||
|
||||
// TODO: Move to booster-specific states - this is workflow-specific, not generic context
|
||||
public bool SuppressRevealBadges { get; set; } = false; // Set by states to suppress NEW/REPEAT badges in revealed state
|
||||
|
||||
// Original transform data (captured on spawn for shrink animations)
|
||||
@@ -35,6 +55,7 @@ namespace UI.CardSystem.StateMachine
|
||||
public Vector3 OriginalPosition { get; private set; }
|
||||
public Quaternion OriginalRotation { get; private set; }
|
||||
|
||||
// TODO: Move to BoosterOpeningPage - reveal flow is booster-specific workflow coordination
|
||||
// Single event for reveal flow completion
|
||||
public event Action<CardContext> OnRevealFlowComplete;
|
||||
|
||||
@@ -44,9 +65,11 @@ namespace UI.CardSystem.StateMachine
|
||||
// Generic drag end event - fired when drag ends, consumers decide how to handle based on current state
|
||||
public event Action<CardContext> OnDragEnded;
|
||||
|
||||
// TODO: Move to booster-specific states - this tracks reveal workflow completion
|
||||
private bool _hasCompletedReveal = false;
|
||||
public bool HasCompletedReveal => _hasCompletedReveal;
|
||||
|
||||
// TODO: Move to booster-specific states - workflow coordination method
|
||||
// Helper method for states to signal completion
|
||||
public void NotifyRevealComplete()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user