mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-15 23:19:29 +00:00
Create VelocityInterpolator
Allow particles to change velocity as they age.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user