ParticleInitiator
Declaration
public class Strawberry.Graphics.ParticleSystem.ParticleInitiator
Configures how particles are initialized when they are spawned.
Fields
Shape
Gets or sets the shape used for particle emission.
EmitShape Shape
ShapeRadius
Gets or sets the radius used for circle emission.
float ShapeRadius
ShapeWidth
Gets or sets the width used for rectangle emission.
float ShapeWidth
ShapeHeight
Gets or sets the height used for rectangle emission.
float ShapeHeight
SpeedMin
Gets or sets the minimum initial particle speed.
float SpeedMin
SpeedMax
Gets or sets the maximum initial particle speed.
float SpeedMax
DirectionMin
Gets or sets the minimum emission direction in degrees.
float DirectionMin
DirectionMax
Gets or sets the maximum emission direction in degrees.
float DirectionMax
LifetimeMin
Gets or sets the minimum lifetime of spawned particles.
float LifetimeMin
LifetimeMax
Gets or sets the maximum lifetime of spawned particles.
float LifetimeMax
ColorStart
Gets or sets the starting color of spawned particles.
Color ColorStart
ScaleMin
Gets or sets the minimum scale applied to spawned particles.
float ScaleMin
ScaleMax
Gets or sets the maximum scale applied to spawned particles.
float ScaleMax
RotationMin
Gets or sets the minimum initial rotation in degrees.
float RotationMin
RotationMax
Gets or sets the maximum initial rotation in degrees.
float RotationMax
AngularVelocityMin
Gets or sets the minimum angular velocity in degrees per second.
float AngularVelocityMin
AngularVelocityMax
Gets or sets the maximum angular velocity in degrees per second.
float AngularVelocityMax
Acceleration
Gets or sets the constant acceleration applied to spawned particles.
Vector2 Acceleration
ImageIndexMin
Gets or sets the minimum image index for spawned particles.
int ImageIndexMin
ImageIndexMax
Gets or sets the maximum image index for spawned particles.
int ImageIndexMax
RandomImageIndex
Gets or sets a value indicating whether the image index is randomized per particle.
bool RandomImageIndex
Methods
Initialize
Initializes the particle properties for a newly spawned particle.
void Initialize(ref Particle particle, Vector2 emitterPosition, Sprite sprite)
Parameters:
| Name | Type | Description |
|---|---|---|
particle |
ref Strawberry.Graphics.ParticleSystem.Particle |
The particle to initialize. |
emitterPosition |
Strawberry.Math.Vector2 |
The emitter position. |
sprite |
Strawberry.Graphics.Sprite |
The sprite used by the particle. |