smrendererv3/SMCode/SM.Base/Drawing/Particles/ParticleInstance.cs
Michel Fedde db7f01dca1 Rewrote the particles to allow for more advanced particles.
+ Particles can now be detached from the object.
+ Each particle now has an own Lifetime, that can be controlled.
+ Particles can now appear in a continuous way.
2021-05-11 21:44:45 +02:00

38 lines
No EOL
910 B
C#

using OpenTK;
namespace SM.Base.Drawing.Particles
{
public class ParticleInstance : Instance
{
public float StartLifetime = 0;
/// <summary>
/// The lifetime this particular particle still has.
/// </summary>
public float Lifetime = 0;
/// <summary>
/// A additional matrix to store rotation and scale.
/// </summary>
public Matrix4 Matrix;
/// <summary>
/// Speeeeeeeeeed
/// </summary>
public float Speed;
}
public class ParticleInstance<TValue> : ParticleInstance
where TValue : struct
{
/// <summary>
/// A direction, that the particle should travel.
/// </summary>
public TValue Direction;
/// <summary>
/// The start position.
/// </summary>
public TValue StartPosition;
}
}