17 lines
331 B
C#
Raw Normal View History

using UnityEngine;
2022-03-02 19:46:33 -08:00
namespace QSB.Animation.Player;
public class AnimFloatParam
{
2022-03-02 19:46:33 -08:00
public float Current { get; private set; }
public float Target { get; set; }
2022-03-02 19:46:33 -08:00
private float _velocity;
2022-03-02 19:46:33 -08:00
public float Smooth(float smoothTime)
{
Current = Mathf.SmoothDamp(Current, Target, ref _velocity, smoothTime);
return Current;
2020-12-02 21:23:01 +00:00
}
}