mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-24 20:12:23 +00:00
18 lines
523 B
C#
18 lines
523 B
C#
namespace MonoGame.Extended.Particles.Modifiers
|
|
{
|
|
public class RotationModifier : Modifier
|
|
{
|
|
public float RotationRate { get; set; }
|
|
|
|
public override unsafe void Update(float elapsedSeconds, ParticleBuffer.ParticleIterator iterator)
|
|
{
|
|
var rotationRateDelta = RotationRate*elapsedSeconds;
|
|
|
|
while (iterator.HasNext)
|
|
{
|
|
var particle = iterator.Next();
|
|
particle->Rotation += rotationRateDelta;
|
|
}
|
|
}
|
|
}
|
|
} |