Stash work
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
using Core.SaveLoad;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UI.CardSystem.StateMachine.States
|
||||
{
|
||||
/// <summary>
|
||||
/// Dragging revealed state for pending cards after flip; minimal overlay of CardDraggingState but no badges.
|
||||
/// </summary>
|
||||
public class CardDraggingRevealedState : AppleState
|
||||
{
|
||||
private CardContext context;
|
||||
private Vector3 originalScale;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
context = GetComponentInParent<CardContext>();
|
||||
}
|
||||
|
||||
public override void OnEnterState()
|
||||
{
|
||||
if (context == null) return;
|
||||
if (context.CardDisplay != null)
|
||||
{
|
||||
context.CardDisplay.gameObject.SetActive(true);
|
||||
context.CardDisplay.transform.localRotation = Quaternion.Euler(0,0,0);
|
||||
}
|
||||
originalScale = context.RootTransform.localScale;
|
||||
context.RootTransform.localScale = originalScale * 1.15f;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
if (context?.RootTransform != null)
|
||||
{
|
||||
context.RootTransform.localScale = originalScale;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user