Class InputFieldAnimator
- Namespace
- Fallencake.UI
- Assembly
- Fallencake.UI.dll
Base animator for input field visual feedback. Handles select/deselect animations using tweened coroutines and exposes events for selection state changes.
public abstract class InputFieldAnimator : MonoBehaviour, IInputFieldAnimator
- Inheritance
-
objectObjectComponentBehaviourMonoBehaviourInputFieldAnimator
- Implements
- Derived
Fields
OnDeselected
Invoked after Deselect() finishes scheduling animation.
public UnityEvent OnDeselected
Field Value
- UnityEvent
OnSelected
Invoked after Select() finishes scheduling animation.
public UnityEvent OnSelected
Field Value
- UnityEvent
_deselectDuration
[SerializeField]
[Range(0, 10)]
protected float _deselectDuration
Field Value
- float
_deselectEase
[SerializeField]
protected AnimationCurve _deselectEase
Field Value
- AnimationCurve
_getDefaultOnInit
[Header("OPTIONS")]
[SerializeField]
protected bool _getDefaultOnInit
Field Value
- bool
_isInitialized
protected bool _isInitialized
Field Value
- bool
_selectDuration
[SerializeField]
[Range(0, 10)]
protected float _selectDuration
Field Value
- float
_selectEase
[SerializeField]
protected AnimationCurve _selectEase
Field Value
- AnimationCurve
_tweenCoroutine
protected Coroutine _tweenCoroutine
Field Value
- Coroutine
Properties
IsInitialized
Indicates whether animator finished initial setup.
public bool IsInitialized { get; }
Property Value
- bool
Methods
Awake()
Initializes the animator.
protected virtual void Awake()
Deselect()
Plays deselect animation using configured ease and duration.
public void Deselect()
Init()
Implement component discovery and default-state caching.
protected abstract void Init()
InstantDeselect()
Applies deselected visuals instantly without tweening.
public void InstantDeselect()
InstantSelect()
Applies selected visuals instantly without tweening.
public void InstantSelect()
InstantUpdate(bool)
Updates visuals immediately for selected/deselected state.
protected abstract void InstantUpdate(bool isSelected)
Parameters
isSelectedboolWhether to render selected state.
OnDisable()
protected virtual void OnDisable()
PlayTweenAnimation(bool, float, AnimationCurve)
Plays a tweened animation for selected/deselected state.
protected abstract IEnumerator PlayTweenAnimation(bool isSelected, float duration, AnimationCurve ease)
Parameters
isSelectedboolTarget selection state.
durationfloatTween duration (seconds).
easeAnimationCurveEasing curve.
Returns
- IEnumerator
Select()
Plays select animation using configured ease and duration.
public void Select()