gmtk-gj-2020/Utilities/TransitionValue.cs
Harrison Deng 47bfeee127 Base concept implemented.
Paddle and balls have been added.
2020-07-11 14:02:52 -05:00

31 lines
672 B
C#

using SlatedGameToolkit.Framework.Graphics.Render;
namespace SkinnerBox.Utilities.Gameplay
{
public struct TransitionValue : IPositionInterpolable
{
private float current;
private float value;
public float Value
{
get
{
return current;
}
set
{
this.value = value;
}
}
public void InterpolatePosition(float delta)
{
this.current += (value - current) * delta;
}
public void HardSet(float value) {
current = value;
this.value = value;
}
}
}