quantum-space-buddies/QSB/Animation/AnimFloatParam.cs
Mister_Nebula c6c76cb395 C L E A N
2020-12-02 21:23:01 +00:00

18 lines
337 B
C#

using UnityEngine;
namespace QSB.Animation
{
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;
}
}
}