Create VelocityInterpolator

Allow particles to change velocity as they age.
This commit is contained in:
slakedclay
2023-01-09 12:21:37 -07:00
committed by GitHub
parent 5595621db3
commit aa1038f31d
@@ -0,0 +1,12 @@
using Microsoft.Xna.Framework;
namespace MonoGame.Extended.Particles.Modifiers.Interpolators
{
public class VelocityInterpolator : Interpolator<Vector2>
{
public override unsafe void Update(float amount, Particle* particle)
{
particle->Velocity = (EndValue - StartValue) * amount + StartValue;
}
}
}