mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-24 12:06:37 +00:00
moved the particle system and the entity component system into their own nuget packages
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using MonoGame.Extended.Particles.Modifiers.Interpolators;
|
||||
|
||||
namespace MonoGame.Extended.Particles.Modifiers
|
||||
{
|
||||
public class AgeModifier : IModifier
|
||||
{
|
||||
public IInterpolator[] Interpolators { get; set; }
|
||||
|
||||
public unsafe void Update(float elapsedSeconds, ParticleBuffer.ParticleIterator iterator)
|
||||
{
|
||||
var n = Interpolators.Length;
|
||||
while (iterator.HasNext)
|
||||
{
|
||||
var particle = iterator.Next();
|
||||
for (var i = 0; i < n; i++)
|
||||
{
|
||||
var interpolator = Interpolators[i];
|
||||
interpolator.Update(particle->Age, particle);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user