Files
AppleHillsProduction/Assets/Scripts/UI/CardSystem/StateMachine/States/CardRevealedState.cs
2025-11-15 20:37:01 +01:00

34 lines
906 B
C#

using Core.SaveLoad;
using UnityEngine;
using UnityEngine.EventSystems;
namespace UI.CardSystem.StateMachine.States
{
/// <summary>
/// Revealed state - card is flipped and visible, waiting for interaction.
/// Can be clicked to enlarge or dragged to place in album.
/// </summary>
public class CardRevealedState : AppleState, IPointerClickHandler
{
private CardContext _context;
private void Awake()
{
_context = GetComponentInParent<CardContext>();
}
public override void OnEnterState()
{
// Card is simply visible and interactable
// No special animations needed
}
public void OnPointerClick(PointerEventData eventData)
{
// Click to enlarge
_context.StateMachine.ChangeState("EnlargedNewState");
}
}
}