34 lines
906 B
C#
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");
|
|
}
|
|
}
|
|
}
|
|
|