Skip to content

Particle

namespace Griff.Scenes;
public struct Particle

One live particle, in world space.

public float Age { get; init; }
public float AgeFrom { get; init; }

Its age before it last moved, for drawing it between steps.

public int Frame { get; init; }

The frame of the emitter’s sprite sheet it was born with, when the emitter picks one at random.

public Vector2 From { get; init; }

Where it was before it last moved (where it was born, until it moves), for drawing it between steps.

public float Lifetime { get; init; }
public Vector2 Position { get; init; }
public float Progress { get; }

0 when born, 1 when it disappears.

public Vector2 Velocity { get; init; }
public void Deconstruct(out Vector2 Position, out Vector2 Velocity, out float Age, out float Lifetime)
public override bool Equals(object obj)
public bool Equals(Particle other)
public override int GetHashCode()
public override string ToString()