ParticleRuntime

Namespace: Murder.Core.Particles
Assembly: Murder.dll

public sealed struct ParticleRuntime

⭐ Constructors

public ParticleRuntime(float startTime, float lifetime, Vector2 position, Vector2 fromPosition, Vector2 gravity, float startAlpha, float startVelocity, float startRotation, float startAcceleration, float startFriction, float startRotationSpeed, float fromAlpha)

Parameters
startTime float
lifetime float
position Vector2
fromPosition Vector2
gravity Vector2
startAlpha float
startVelocity float
startRotation float
startAcceleration float
startFriction float
startRotationSpeed float
fromAlpha float

⭐ Properties

Acceleration

public float Acceleration;

Returns
float

Alpha

public float Alpha;

Returns
float

Delta

public float Delta { get; private set; }

This is the lifetime of the particle over 0 to 1.

Returns
float

Friction

public float Friction;

Returns
float

Gravity

public Vector2 Gravity;

Returns
Vector2

Lifetime

public readonly float Lifetime;

Returns
float

Position

public Vector2 Position { get; }

Returns
Vector2

Rotation

public float Rotation;

Returns
float

RotationSpeed

public float RotationSpeed;

Returns
float

StartRotation

public float StartRotation;

Returns
float

Velocity

public float Velocity;

Returns
float

⭐ Methods

Step(Particle&, float, float)

public void Step(Particle& particle, float currentTime, float dt)

Parameters
particle Particle&
currentTime float
dt float

UpdateAlpha(float)

public void UpdateAlpha(float alpha)

Parameters
alpha float

UpdateFromPosition(Vector2)

public void UpdateFromPosition(Vector2 from)

Parameters
from Vector2