Particle

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

public sealed struct Particle

⭐ Constructors

public Particle()
public Particle(ParticleTexture texture, ImmutableArray<T> colors, ImmutableArray<T> scale, ParticleValueProperty alpha, ParticleValueProperty acceleration, ParticleValueProperty friction, ParticleValueProperty startVelocity, ParticleValueProperty rotationSpeed, ParticleValueProperty rotation, ParticleValueProperty lifeTime, bool rotateWithVelocity, float sortOffset)

Parameters
texture ParticleTexture
colors ImmutableArray<T>
scale ImmutableArray<T>
alpha ParticleValueProperty
acceleration ParticleValueProperty
friction ParticleValueProperty
startVelocity ParticleValueProperty
rotationSpeed ParticleValueProperty
rotation ParticleValueProperty
lifeTime ParticleValueProperty
rotateWithVelocity bool
sortOffset float

⭐ Properties

Acceleration

public readonly ParticleValueProperty Acceleration;

Returns
ParticleValueProperty

Alpha

public readonly ParticleValueProperty Alpha;

Returns
ParticleValueProperty

Colors

public readonly ImmutableArray<T> Colors;

Returns
ImmutableArray<T>

FollowEntityPosition

public readonly bool FollowEntityPosition;

Returns
bool

Friction

public readonly ParticleValueProperty Friction;

Returns
ParticleValueProperty

Gravity

public readonly ParticleVectorValueProperty Gravity;

Returns
ParticleVectorValueProperty

LifeTime

public readonly ParticleValueProperty LifeTime;

Returns
ParticleValueProperty

RotateWithVelocity

public readonly bool RotateWithVelocity;

Returns
bool

Rotation

public readonly ParticleValueProperty Rotation;

Returns
ParticleValueProperty

RotationSpeed

public readonly ParticleValueProperty RotationSpeed;

Returns
ParticleValueProperty

Scale

public readonly ImmutableArray<T> Scale;

Returns
ImmutableArray<T>

SortOffset

public readonly float SortOffset;

Returns
float

SpriteBatch

public readonly int SpriteBatch;

Returns
int

StartVelocity

public readonly ParticleValueProperty StartVelocity;

Returns
ParticleValueProperty

Texture

public readonly ParticleTexture Texture;

Returns
ParticleTexture

⭐ Methods

CalculateColor(float)

public Color CalculateColor(float delta)

Calculate the color of a particle in a with internal {0, 1}.

Parameters
delta float

Returns
Color

WithRotation(float)

public Particle WithRotation(float rotation)

Parameters
rotation float

Returns
Particle

WithTexture(ParticleTexture)

public Particle WithTexture(ParticleTexture texture)

Parameters
texture ParticleTexture

Returns
Particle

CalculateScale(float)

public Vector2 CalculateScale(float delta)

Calculate the scale of a particle in a with internal {0, 1}.

Parameters
delta float

Returns
Vector2