Make cards use settings
This commit is contained in:
committed by
Michal Pikulski
parent
4fdbbb0aa8
commit
a6471ede45
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user