Working refactor of cleaned up card structure
This commit is contained in:
@@ -87,7 +87,7 @@ namespace UI.CardSystem.StateMachine.States
|
||||
{
|
||||
Logging.Warning("[CardDraggingRevealedState] No target slot set - cannot place card");
|
||||
// Return to corner
|
||||
_context.StateMachine.ChangeState("PendingFaceDownState");
|
||||
_context.StateMachine.ChangeState(CardStateNames.PendingFaceDown);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -95,11 +95,11 @@ namespace UI.CardSystem.StateMachine.States
|
||||
var albumPage = _context.AlbumViewPage;
|
||||
if (albumPage == null)
|
||||
{
|
||||
Logging.Warning("[CardDraggingRevealedState] AlbumViewPage not found - placing immediately");
|
||||
Logging.Warning("[CardDraggingRevealedState] AlbumViewPage not injected - placing immediately");
|
||||
TransitionToPlacement(_context);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Check if page is still flipping
|
||||
if (albumPage.IsPageFlipping)
|
||||
{
|
||||
@@ -146,7 +146,7 @@ namespace UI.CardSystem.StateMachine.States
|
||||
var card = ctx.GetComponent<Card>();
|
||||
if (card != null)
|
||||
{
|
||||
var placedState = card.GetStateComponent<CardPlacedInSlotState>("PlacedInSlotState");
|
||||
var placedState = card.GetStateComponent<CardPlacedInSlotState>(CardStateNames.PlacedInSlot);
|
||||
if (placedState != null)
|
||||
{
|
||||
placedState.SetPlacementInfo(_targetSlot);
|
||||
@@ -155,7 +155,7 @@ namespace UI.CardSystem.StateMachine.States
|
||||
|
||||
// Transition to PlacedInSlotState
|
||||
// The state will handle animation and finalization in OnEnterState
|
||||
ctx.StateMachine.ChangeState("PlacedInSlotState");
|
||||
ctx.StateMachine.ChangeState(CardStateNames.PlacedInSlot);
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
|
||||
Reference in New Issue
Block a user