quantum-space-buddies/QSB/Animation/AnimFloatParam.cs
Mister_Nebula 0c50650608 fixes
2020-08-22 17:26:48 +01:00

18 lines
400 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;
}
}
}