quantum-space-buddies/QSB/Animation/AnimFloatParam.cs
AmazingAlek d7c0c06698
Alek/decoupling (#23)
* refactoring
2020-02-21 23:36:07 +01:00

19 lines
401 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;
}
}
}