Make cards use settings

This commit is contained in:
Michal Pikulski
2025-11-12 09:24:27 +01:00
committed by Michal Pikulski
parent 4fdbbb0aa8
commit a6471ede45
15 changed files with 232 additions and 69 deletions

View File

@@ -1,6 +1,8 @@
using Core.SaveLoad;
using UnityEngine;
using UnityEngine.EventSystems;
using AppleHills.Core.Settings;
using Core;
namespace UI.CardSystem.StateMachine.States
{
@@ -14,11 +16,13 @@ namespace UI.CardSystem.StateMachine.States
[SerializeField] private GameObject newCardBadge;
private CardContext _context;
private ICardSystemSettings _settings;
private Vector3 _originalScale;
private void Awake()
{
_context = GetComponentInParent<CardContext>();
_settings = GameManager.GetSettingsObject<ICardSystemSettings>();
}
public override void OnEnterState()
@@ -35,7 +39,7 @@ namespace UI.CardSystem.StateMachine.States
// Enlarge the card
if (_context.Animator != null)
{
_context.Animator.PlayEnlarge();
_context.Animator.PlayEnlarge(_settings.NewCardEnlargedScale);
}
}