Make cards use settings
This commit is contained in:
committed by
Michal Pikulski
parent
4fdbbb0aa8
commit
a6471ede45
@@ -1,7 +1,7 @@
|
||||
using Core.SaveLoad;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using Core;
|
||||
using AppleHills.Core.Settings;
|
||||
|
||||
namespace UI.CardSystem.StateMachine.States
|
||||
{
|
||||
@@ -11,16 +11,15 @@ namespace UI.CardSystem.StateMachine.States
|
||||
/// </summary>
|
||||
public class CardDraggingState : AppleState
|
||||
{
|
||||
[Header("Drag Settings")]
|
||||
[SerializeField] private float dragScale = 1.1f;
|
||||
|
||||
private CardContext _context;
|
||||
private ICardSystemSettings _settings;
|
||||
private Vector3 _originalScale;
|
||||
private Vector3 _dragStartPosition;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_context = GetComponentInParent<CardContext>();
|
||||
_settings = GameManager.GetSettingsObject<ICardSystemSettings>();
|
||||
}
|
||||
|
||||
public override void OnEnterState()
|
||||
@@ -30,7 +29,7 @@ namespace UI.CardSystem.StateMachine.States
|
||||
_dragStartPosition = _context.RootTransform.position;
|
||||
|
||||
// Scale up slightly during drag for visual feedback
|
||||
_context.RootTransform.localScale = _originalScale * dragScale;
|
||||
_context.RootTransform.localScale = _originalScale * _settings.DragScale;
|
||||
|
||||
Logging.Debug($"[CardDraggingState] Entered drag state for card: {_context.CardData?.Name}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user