Base concept implemented.
Paddle and balls have been added.
This commit is contained in:
31
Utilities/TransitionValue.cs
Normal file
31
Utilities/TransitionValue.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user