quantum-space-buddies/QSB/Animation/Player/AnimFloatParam.cs
2022-03-02 19:46:33 -08:00

17 lines
331 B
C#

using UnityEngine;
namespace QSB.Animation.Player;
public class AnimFloatParam
{
public float Current { get; private set; }
public float Target { get; set; }
private float _velocity;
public float Smooth(float smoothTime)
{
Current = Mathf.SmoothDamp(Current, Target, ref _velocity, smoothTime);
return Current;
}
}