reckfellENGINE

CpuParticles2D

A CPU-based 2D particle emitter.

On this page
class CpuParticles2DReckfellSharpInherits Entity2D

A CPU-based 2D particle emitter.

CPU-based 2D particle node used to create a variety of particle systems and effects. See also GpuParticles2D, which provides the same functionality with hardware acceleration, but may not run on older devices.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

CpuParticles2DConstructor
# CpuParticles2D
C#
public CpuParticles2D();

Properties69

AmountProperty
# Amount
C#
public int Amount { get; set; }

Number of particles emitted in one emission cycle.

AngleCurveProperty
# AngleCurve
C#
public Curve AngleCurve { get; set; }

Each particle's rotation will be animated along this Curve. Should be a unit Curve.

AngleMaxProperty
# AngleMax
C#
public float AngleMax { get; set; }

Maximum initial rotation applied to each particle, in degrees.

AngleMinProperty
# AngleMin
C#
public float AngleMin { get; set; }

Minimum equivalent of CpuParticles2D.AngleMax.

AngularVelocityCurveProperty
# AngularVelocityCurve
C#
public Curve AngularVelocityCurve { get; set; }

Each particle's angular velocity will vary along this Curve. Should be a unit Curve.

AngularVelocityMaxProperty
# AngularVelocityMax
C#
public float AngularVelocityMax { get; set; }

Maximum initial angular velocity (rotation speed) applied to each particle in degrees per second.

AngularVelocityMinProperty
# AngularVelocityMin
C#
public float AngularVelocityMin { get; set; }

Minimum equivalent of CpuParticles2D.AngularVelocityMax.

AnimOffsetCurveProperty
# AnimOffsetCurve
C#
public Curve AnimOffsetCurve { get; set; }

Each particle's animation offset will vary along this Curve. Should be a unit Curve.

AnimOffsetMaxProperty
# AnimOffsetMax
C#
public float AnimOffsetMax { get; set; }

Maximum animation offset that corresponds to frame index in the texture. 0 is the first frame, 1 is the last one. See CanvasItemMaterial.ParticlesAnimation.

AnimOffsetMinProperty
# AnimOffsetMin
C#
public float AnimOffsetMin { get; set; }

Minimum equivalent of CpuParticles2D.AnimOffsetMax.

AnimSpeedCurveProperty
# AnimSpeedCurve
C#
public Curve AnimSpeedCurve { get; set; }

Each particle's animation speed will vary along this Curve. Should be a unit Curve.

AnimSpeedMaxProperty
# AnimSpeedMax
C#
public float AnimSpeedMax { get; set; }

Maximum particle animation speed. Animation speed of 1 means that the particles will make full 0 to 1 offset cycle during lifetime, 2 means 2 cycles etc. With animation speed greater than 1, remember to enable CanvasItemMaterial.ParticlesAnimLoop property if you want the animation to repeat.

AnimSpeedMinProperty
# AnimSpeedMin
C#
public float AnimSpeedMin { get; set; }

Minimum equivalent of CpuParticles2D.AnimSpeedMax.

ColorProperty
# Color
C#
public Color Color { get; set; }

Each particle's initial color. If CpuParticles2D.Texture is defined, it will be multiplied by this color.

ColorInitialRampProperty
# ColorInitialRamp
C#
public Gradient ColorInitialRamp { get; set; }

Each particle's initial color will vary along this Gradient (multiplied with CpuParticles2D.Color).

ColorRampProperty
# ColorRamp
C#
public Gradient ColorRamp { get; set; }

Each particle's color will vary along this Gradient over its lifetime (multiplied with CpuParticles2D.Color).

DampingCurveProperty
# DampingCurve
C#
public Curve DampingCurve { get; set; }

Damping will vary along this Curve. Should be a unit Curve.

DampingMaxProperty
# DampingMax
C#
public float DampingMax { get; set; }

The maximum rate at which particles lose velocity. For example value of 100 means that the particle will go from 100 velocity to 0 in 1 second.

DampingMinProperty
# DampingMin
C#
public float DampingMin { get; set; }

Minimum equivalent of CpuParticles2D.DampingMax.

DirectionProperty
# Direction
C#
public Vector2 Direction { get; set; }

Unit vector specifying the particles' emission direction.

DrawOrderProperty
# DrawOrder
C#
public CpuParticles2D.DrawOrderEnum DrawOrder { get; set; }

Particle draw order.

EmissionColorsProperty
# EmissionColors
C#
public Color[] EmissionColors { get; set; }

Sets the Colors to modulate particles by when using CpuParticles2D.EmissionShapeEnum.Points or CpuParticles2D.EmissionShapeEnum.DirectedPoints.

EmissionNormalsProperty
# EmissionNormals
C#
public Vector2[] EmissionNormals { get; set; }

Sets the direction the particles will be emitted in when using CpuParticles2D.EmissionShapeEnum.DirectedPoints.

EmissionPointsProperty
# EmissionPoints
C#
public Vector2[] EmissionPoints { get; set; }

Sets the initial positions to spawn particles when using CpuParticles2D.EmissionShapeEnum.Points or CpuParticles2D.EmissionShapeEnum.DirectedPoints.

EmissionRectExtentsProperty
# EmissionRectExtents
C#
public Vector2 EmissionRectExtents { get; set; }

The rectangle's extents if CpuParticles2D.EmissionShape is set to CpuParticles2D.EmissionShapeEnum.Rectangle.

EmissionRingInnerRadiusProperty
# EmissionRingInnerRadius
C#
public float EmissionRingInnerRadius { get; set; }

The ring's inner radius if CpuParticles2D.EmissionShape is set to CpuParticles2D.EmissionShapeEnum.Ring.

EmissionRingRadiusProperty
# EmissionRingRadius
C#
public float EmissionRingRadius { get; set; }

The ring's outer radius if CpuParticles2D.EmissionShape is set to CpuParticles2D.EmissionShapeEnum.Ring.

EmissionShapeProperty
# EmissionShape
C#
public CpuParticles2D.EmissionShapeEnum EmissionShape { get; set; }

Particles will be emitted inside this region.

EmissionSphereRadiusProperty
# EmissionSphereRadius
C#
public float EmissionSphereRadius { get; set; }

The sphere's radius if CpuParticles2D.EmissionShape is set to CpuParticles2D.EmissionShapeEnum.Sphere.

EmittingProperty
# Emitting
C#
public bool Emitting { get; set; }

Allows new particles to be emitted. false does not delete existing live particles; they remain until their lifetimes end. This is not a full pause or Restart. For OneShot, observe Finished rather than treating Emitting=false as proof that the screen is empty.

ExplosivenessProperty
# Explosiveness
C#
public float Explosiveness { get; set; }

How rapidly particles in an emission cycle are emitted. If greater than 0, there will be a gap in emissions before the next cycle begins.

FixedFpsProperty
# FixedFps
C#
public int FixedFps { get; set; }

The particle system's frame rate is fixed to a value. For example, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself.

FractDeltaProperty
# FractDelta
C#
public bool FractDelta { get; set; }

If true, results in fractional delta calculation which has a smoother particles display effect.

GravityProperty
# Gravity
C#
public Vector2 Gravity { get; set; }

Gravity applied to every particle.

HueVariationCurveProperty
# HueVariationCurve
C#
public Curve HueVariationCurve { get; set; }

Each particle's hue will vary along this Curve. Should be a unit Curve.

HueVariationMaxProperty
# HueVariationMax
C#
public float HueVariationMax { get; set; }

Maximum initial hue variation applied to each particle. It will shift the particle color's hue.

HueVariationMinProperty
# HueVariationMin
C#
public float HueVariationMin { get; set; }

Minimum equivalent of CpuParticles2D.HueVariationMax.

InitialVelocityMaxProperty
# InitialVelocityMax
C#
public float InitialVelocityMax { get; set; }

Maximum initial velocity magnitude for each particle. Direction comes from CpuParticles2D.Direction and CpuParticles2D.Spread.

InitialVelocityMinProperty
# InitialVelocityMin
C#
public float InitialVelocityMin { get; set; }

Minimum equivalent of CpuParticles2D.InitialVelocityMax.

LifetimeProperty
# Lifetime
C#
public double Lifetime { get; set; }

Amount of time each particle will exist.

LifetimeRandomnessProperty
# LifetimeRandomness
C#
public double LifetimeRandomness { get; set; }

Particle lifetime randomness ratio.

LinearAccelCurveProperty
# LinearAccelCurve
C#
public Curve LinearAccelCurve { get; set; }

Each particle's linear acceleration will vary along this Curve. Should be a unit Curve.

LinearAccelMaxProperty
# LinearAccelMax
C#
public float LinearAccelMax { get; set; }

Maximum linear acceleration applied to each particle in the direction of motion.

LinearAccelMinProperty
# LinearAccelMin
C#
public float LinearAccelMin { get; set; }

Minimum equivalent of CpuParticles2D.LinearAccelMax.

LocalCoordsProperty
# LocalCoords
C#
public bool LocalCoords { get; set; }

Selects simulation space. With true, previously emitted particles follow emitter transforms; with false, they remain in world canvas space when the emitter subsequently moves. Choose before starting the effect and account for visibility bounds separately.

OneShotProperty
# OneShot
C#
public bool OneShot { get; set; }

If true, only one emission cycle occurs. If set true during a cycle, emission will stop at the cycle's end.

OrbitVelocityCurveProperty
# OrbitVelocityCurve
C#
public Curve OrbitVelocityCurve { get; set; }

Each particle's orbital velocity will vary along this Curve. Should be a unit Curve.

OrbitVelocityMaxProperty
# OrbitVelocityMax
C#
public float OrbitVelocityMax { get; set; }

Maximum orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second.

OrbitVelocityMinProperty
# OrbitVelocityMin
C#
public float OrbitVelocityMin { get; set; }

Minimum equivalent of CpuParticles2D.OrbitVelocityMax.

ParticleFlagAlignYProperty
# ParticleFlagAlignY
C#
public bool ParticleFlagAlignY { get; set; }

Align Y axis of particle with the direction of its velocity.

PreprocessProperty
# Preprocess
C#
public double Preprocess { get; set; }

Particle system starts as if it had already run for this many seconds.

RadialAccelCurveProperty
# RadialAccelCurve
C#
public Curve RadialAccelCurve { get; set; }

Each particle's radial acceleration will vary along this Curve. Should be a unit Curve.

RadialAccelMaxProperty
# RadialAccelMax
C#
public float RadialAccelMax { get; set; }

Maximum radial acceleration applied to each particle. Makes particle accelerate away from the origin or towards it if negative.

RadialAccelMinProperty
# RadialAccelMin
C#
public float RadialAccelMin { get; set; }

Minimum equivalent of CpuParticles2D.RadialAccelMax.

RandomnessProperty
# Randomness
C#
public float Randomness { get; set; }

Emission lifetime randomness ratio.

ScaleAmountCurveProperty
# ScaleAmountCurve
C#
public Curve ScaleAmountCurve { get; set; }

Each particle's scale will vary along this Curve. Should be a unit Curve.

ScaleAmountMaxProperty
# ScaleAmountMax
C#
public float ScaleAmountMax { get; set; }

Maximum initial scale applied to each particle.

ScaleAmountMinProperty
# ScaleAmountMin
C#
public float ScaleAmountMin { get; set; }

Minimum equivalent of CpuParticles2D.ScaleAmountMax.

ScaleCurveXProperty
# ScaleCurveX
C#
public Curve ScaleCurveX { get; set; }

Each particle's horizontal scale will vary along this Curve. Should be a unit Curve. CpuParticles2D.SplitScale must be enabled.

ScaleCurveYProperty
# ScaleCurveY
C#
public Curve ScaleCurveY { get; set; }

Each particle's vertical scale will vary along this Curve. Should be a unit Curve. CpuParticles2D.SplitScale must be enabled.

SeedProperty
# Seed
C#
public uint Seed { get; set; }

Sets the random seed used by the particle system. Only effective if CpuParticles2D.UseFixedSeed is true.

SpeedScaleProperty
# SpeedScale
C#
public double SpeedScale { get; set; }

Particle system's running speed scaling ratio. A value of 0 can be used to pause the particles.

SplitScaleProperty
# SplitScale
C#
public bool SplitScale { get; set; }

If true, the scale curve will be split into x and y components. See CpuParticles2D.ScaleCurveX and CpuParticles2D.ScaleCurveY.

SpreadProperty
# Spread
C#
public float Spread { get; set; }

Each particle's initial direction range from +spread to -spread degrees.

TangentialAccelCurveProperty
# TangentialAccelCurve
C#
public Curve TangentialAccelCurve { get; set; }

Each particle's tangential acceleration will vary along this Curve. Should be a unit Curve.

TangentialAccelMaxProperty
# TangentialAccelMax
C#
public float TangentialAccelMax { get; set; }

Maximum tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.

TangentialAccelMinProperty
# TangentialAccelMin
C#
public float TangentialAccelMin { get; set; }

Minimum equivalent of CpuParticles2D.TangentialAccelMax.

TextureProperty
# Texture
C#
public Texture2D Texture { get; set; }

Particle texture. If null, particles will be squares.

UseFixedSeedProperty
# UseFixedSeed
C#
public bool UseFixedSeed { get; set; }

If true, particles will use the same seed for every simulation using the seed defined in CpuParticles2D.Seed. This is useful for situations where the visual outcome should be consistent across replays, for example when using Movie Maker mode.

Methods82

ConvertFromParticlesvoid
# ConvertFromParticles
C#
public void ConvertFromParticles(Entity particles);

Sets this node's properties to match a given GpuParticles2D node with an assigned ParticleProcessMaterial.

Parameters
NameTypeDefault
particlesEntity—
GetAmountint
# GetAmount
C#
public int GetAmount();
Returns int
GetColorColor
# GetColor
C#
public Color GetColor();
Returns Color
GetColorInitialRampGradient
# GetColorInitialRamp
C#
public Gradient GetColorInitialRamp();
Returns Gradient
GetColorRampGradient
# GetColorRamp
C#
public Gradient GetColorRamp();
Returns Gradient
GetDirectionVector2
# GetDirection
C#
public Vector2 GetDirection();
Returns Vector2
GetDrawOrderCpuParticles2D.DrawOrderEnum
# GetDrawOrder
C#
public CpuParticles2D.DrawOrderEnum GetDrawOrder();
Returns CpuParticles2D.DrawOrderEnum
GetEmissionColorsColor[]
# GetEmissionColors
C#
public Color[] GetEmissionColors();
Returns Color[]
GetEmissionNormalsVector2[]
# GetEmissionNormals
C#
public Vector2[] GetEmissionNormals();
Returns Vector2[]
GetEmissionPointsVector2[]
# GetEmissionPoints
C#
public Vector2[] GetEmissionPoints();
Returns Vector2[]
GetEmissionRectExtentsVector2
# GetEmissionRectExtents
C#
public Vector2 GetEmissionRectExtents();
Returns Vector2
GetEmissionRingInnerRadiusfloat
# GetEmissionRingInnerRadius
C#
public float GetEmissionRingInnerRadius();
Returns float
GetEmissionRingRadiusfloat
# GetEmissionRingRadius
C#
public float GetEmissionRingRadius();
Returns float
GetEmissionShapeCpuParticles2D.EmissionShapeEnum
# GetEmissionShape
C#
public CpuParticles2D.EmissionShapeEnum GetEmissionShape();
Returns CpuParticles2D.EmissionShapeEnum
GetEmissionSphereRadiusfloat
# GetEmissionSphereRadius
C#
public float GetEmissionSphereRadius();
Returns float
GetExplosivenessRatiofloat
# GetExplosivenessRatio
C#
public float GetExplosivenessRatio();
Returns float
GetFixedFpsint
# GetFixedFps
C#
public int GetFixedFps();
Returns int
GetFractionalDeltabool
# GetFractionalDelta
C#
public bool GetFractionalDelta();
Returns bool
GetGravityVector2
# GetGravity
C#
public Vector2 GetGravity();
Returns Vector2
GetLifetimedouble
# GetLifetime
C#
public double GetLifetime();
Returns double
GetLifetimeRandomnessdouble
# GetLifetimeRandomness
C#
public double GetLifetimeRandomness();
Returns double
GetOneShotbool
# GetOneShot
C#
public bool GetOneShot();
Returns bool
GetParamCurveCurve
# GetParamCurve
C#
public Curve GetParamCurve(CpuParticles2D.Parameter param);

Returns the Curve of the parameter specified by CpuParticles2D.Parameter.

Parameters
NameTypeDefault
paramCpuParticles2D.Parameter—
Returns Curve
GetParamMaxfloat
# GetParamMax
C#
public float GetParamMax(CpuParticles2D.Parameter param);

Returns the maximum value range for the given parameter.

Parameters
NameTypeDefault
paramCpuParticles2D.Parameter—
Returns float
GetParamMinfloat
# GetParamMin
C#
public float GetParamMin(CpuParticles2D.Parameter param);

Returns the minimum value range for the given parameter.

Parameters
NameTypeDefault
paramCpuParticles2D.Parameter—
Returns float
GetParticleFlagbool
# GetParticleFlag
C#
public bool GetParticleFlag(CpuParticles2D.ParticleFlags particleFlag);

Returns the enabled state of the given particle flag.

Parameters
NameTypeDefault
particleFlagCpuParticles2D.ParticleFlags—
Returns bool
GetPreProcessTimedouble
# GetPreProcessTime
C#
public double GetPreProcessTime();
Returns double
GetRandomnessRatiofloat
# GetRandomnessRatio
C#
public float GetRandomnessRatio();
Returns float
GetScaleCurveXCurve
# GetScaleCurveX
C#
public Curve GetScaleCurveX();
Returns Curve
GetScaleCurveYCurve
# GetScaleCurveY
C#
public Curve GetScaleCurveY();
Returns Curve
GetSeeduint
# GetSeed
C#
public uint GetSeed();
Returns uint
GetSpeedScaledouble
# GetSpeedScale
C#
public double GetSpeedScale();
Returns double
GetSplitScalebool
# GetSplitScale
C#
public bool GetSplitScale();
Returns bool
GetSpreadfloat
# GetSpread
C#
public float GetSpread();
Returns float
GetTextureTexture2D
# GetTexture
C#
public Texture2D GetTexture();
Returns Texture2D
GetUseFixedSeedbool
# GetUseFixedSeed
C#
public bool GetUseFixedSeed();
Returns bool
GetUseLocalCoordinatesbool
# GetUseLocalCoordinates
C#
public bool GetUseLocalCoordinates();
Returns bool
IsEmittingbool
# IsEmitting
C#
public bool IsEmitting();
Returns bool
RequestParticlesProcess2 overloads
# RequestParticlesProcess · 1/2
C#
public void RequestParticlesProcess(float processTime);

Requests the particles to process for extra process time during a single frame. process_time defines the time that the particles will process while emitting is on. process_time_residual defines the time that particles will process with emitting turned off for the simulation. When combined with CpuParticles2D.SpeedScale set to 0.0, this is useful to be able to seek a particle system timeline.

Parameters
NameTypeDefault
processTimefloat—
# RequestParticlesProcess · 2/2
C#
public void RequestParticlesProcess(float processTime, float processTimeResidual = 0f);

Requests the particles to process for extra process time during a single frame. process_time defines the time that the particles will process while emitting is on. process_time_residual defines the time that particles will process with emitting turned off for the simulation. When combined with CpuParticles2D.SpeedScale set to 0.0, this is useful to be able to seek a particle system timeline.

Parameters
NameTypeDefault
processTimefloat—
processTimeResidualfloat0f
Restart2 overloads
# Restart · 1/2
C#
public void Restart();

Restarts the particle system. Use Restart(bool keepSeed) for explicit seed control. Restart differs from merely setting Emitting=true and begins the effect again.

# Restart · 2/2
C#
public void Restart(bool keepSeed = false);

Resets simulation state and enables emission. Seed is retained when keepSeed=true or UseFixedSeed=true; a new random value is selected only when both are false. The image changes after processing/rendering a frame.

Parameters
NameTypeDefault
keepSeedboolfalse
keepSeed

true retains the current seed. false does not force a new seed when UseFixedSeed is already true. Keeping a seed does not guarantee identical pixels across CPU/GPU implementations, devices or configurations.

SetAmountvoid
# SetAmount
C#
public void SetAmount(int amount);
Parameters
NameTypeDefault
amountint—
SetColorvoid
# SetColor
C#
public void SetColor(Color color);
Parameters
NameTypeDefault
colorColor—
SetColorInitialRampvoid
# SetColorInitialRamp
C#
public void SetColorInitialRamp(Gradient ramp);
Parameters
NameTypeDefault
rampGradient—
SetColorRampvoid
# SetColorRamp
C#
public void SetColorRamp(Gradient ramp);
Parameters
NameTypeDefault
rampGradient—
SetDirectionvoid
# SetDirection
C#
public void SetDirection(Vector2 direction);
Parameters
NameTypeDefault
directionVector2—
SetDrawOrdervoid
# SetDrawOrder
C#
public void SetDrawOrder(CpuParticles2D.DrawOrderEnum order);
Parameters
NameTypeDefault
orderCpuParticles2D.DrawOrderEnum—
SetEmissionColors2 overloads
# SetEmissionColors · 1/2
C#
public void SetEmissionColors(Color[] array);
Parameters
NameTypeDefault
arrayColor[]—
# SetEmissionColors · 2/2
C#
public void SetEmissionColors(ReadOnlySpan<Color> array);
Parameters
NameTypeDefault
arrayReadOnlySpan<Color>—
SetEmissionNormals2 overloads
# SetEmissionNormals · 1/2
C#
public void SetEmissionNormals(Vector2[] array);
Parameters
NameTypeDefault
arrayVector2[]—
# SetEmissionNormals · 2/2
C#
public void SetEmissionNormals(ReadOnlySpan<Vector2> array);
Parameters
NameTypeDefault
arrayReadOnlySpan<Vector2>—
SetEmissionPoints2 overloads
# SetEmissionPoints · 1/2
C#
public void SetEmissionPoints(Vector2[] array);
Parameters
NameTypeDefault
arrayVector2[]—
# SetEmissionPoints · 2/2
C#
public void SetEmissionPoints(ReadOnlySpan<Vector2> array);
Parameters
NameTypeDefault
arrayReadOnlySpan<Vector2>—
SetEmissionRectExtentsvoid
# SetEmissionRectExtents
C#
public void SetEmissionRectExtents(Vector2 extents);
Parameters
NameTypeDefault
extentsVector2—
SetEmissionRingInnerRadiusvoid
# SetEmissionRingInnerRadius
C#
public void SetEmissionRingInnerRadius(float innerRadius);
Parameters
NameTypeDefault
innerRadiusfloat—
SetEmissionRingRadiusvoid
# SetEmissionRingRadius
C#
public void SetEmissionRingRadius(float radius);
Parameters
NameTypeDefault
radiusfloat—
SetEmissionShapevoid
# SetEmissionShape
C#
public void SetEmissionShape(CpuParticles2D.EmissionShapeEnum shape);
Parameters
NameTypeDefault
shapeCpuParticles2D.EmissionShapeEnum—
SetEmissionSphereRadiusvoid
# SetEmissionSphereRadius
C#
public void SetEmissionSphereRadius(float radius);
Parameters
NameTypeDefault
radiusfloat—
SetEmittingvoid
# SetEmitting
C#
public void SetEmitting(bool emitting);
Parameters
NameTypeDefault
emittingbool—
SetExplosivenessRatiovoid
# SetExplosivenessRatio
C#
public void SetExplosivenessRatio(float ratio);
Parameters
NameTypeDefault
ratiofloat—
SetFixedFpsvoid
# SetFixedFps
C#
public void SetFixedFps(int fps);
Parameters
NameTypeDefault
fpsint—
SetFractionalDeltavoid
# SetFractionalDelta
C#
public void SetFractionalDelta(bool enable);
Parameters
NameTypeDefault
enablebool—
SetGravityvoid
# SetGravity
C#
public void SetGravity(Vector2 accelVec);
Parameters
NameTypeDefault
accelVecVector2—
SetLifetimevoid
# SetLifetime
C#
public void SetLifetime(double secs);
Parameters
NameTypeDefault
secsdouble—
SetLifetimeRandomnessvoid
# SetLifetimeRandomness
C#
public void SetLifetimeRandomness(double random);
Parameters
NameTypeDefault
randomdouble—
SetOneShotvoid
# SetOneShot
C#
public void SetOneShot(bool enable);
Parameters
NameTypeDefault
enablebool—
SetParamCurvevoid
# SetParamCurve
C#
public void SetParamCurve(CpuParticles2D.Parameter param, Curve curve);

Sets the Curve of the parameter specified by CpuParticles2D.Parameter. Should be a unit Curve.

Parameters
NameTypeDefault
paramCpuParticles2D.Parameter—
curveCurve—
SetParamMaxvoid
# SetParamMax
C#
public void SetParamMax(CpuParticles2D.Parameter param, float value);

Sets the maximum value for the given parameter.

Parameters
NameTypeDefault
paramCpuParticles2D.Parameter—
valuefloat—
SetParamMinvoid
# SetParamMin
C#
public void SetParamMin(CpuParticles2D.Parameter param, float value);

Sets the minimum value for the given parameter.

Parameters
NameTypeDefault
paramCpuParticles2D.Parameter—
valuefloat—
SetParticleFlagvoid
# SetParticleFlag
C#
public void SetParticleFlag(CpuParticles2D.ParticleFlags particleFlag, bool enable);

Enables or disables the given particle flag.

Parameters
NameTypeDefault
particleFlagCpuParticles2D.ParticleFlags—
enablebool—
SetPreProcessTimevoid
# SetPreProcessTime
C#
public void SetPreProcessTime(double secs);
Parameters
NameTypeDefault
secsdouble—
SetRandomnessRatiovoid
# SetRandomnessRatio
C#
public void SetRandomnessRatio(float ratio);
Parameters
NameTypeDefault
ratiofloat—
SetScaleCurveXvoid
# SetScaleCurveX
C#
public void SetScaleCurveX(Curve scaleCurve);
Parameters
NameTypeDefault
scaleCurveCurve—
SetScaleCurveYvoid
# SetScaleCurveY
C#
public void SetScaleCurveY(Curve scaleCurve);
Parameters
NameTypeDefault
scaleCurveCurve—
SetSeedvoid
# SetSeed
C#
public void SetSeed(uint seed);
Parameters
NameTypeDefault
seeduint—
SetSpeedScalevoid
# SetSpeedScale
C#
public void SetSpeedScale(double scale);
Parameters
NameTypeDefault
scaledouble—
SetSplitScalevoid
# SetSplitScale
C#
public void SetSplitScale(bool splitScale);
Parameters
NameTypeDefault
splitScalebool—
SetSpreadvoid
# SetSpread
C#
public void SetSpread(float spread);
Parameters
NameTypeDefault
spreadfloat—
SetTexturevoid
# SetTexture
C#
public void SetTexture(Texture2D texture);
Parameters
NameTypeDefault
textureTexture2D—
SetUseFixedSeedvoid
# SetUseFixedSeed
C#
public void SetUseFixedSeed(bool useFixedSeed);
Parameters
NameTypeDefault
useFixedSeedbool—
SetUseLocalCoordinatesvoid
# SetUseLocalCoordinates
C#
public void SetUseLocalCoordinates(bool enable);
Parameters
NameTypeDefault
enablebool—

Signals and events1

FinishedEvent
# Finished
C#
public event Action Finished;

Emitted when all active particles have finished processing. When CpuParticles2D.OneShot is disabled, particles will process continuously, so this is never emitted.

CpuParticles2D.DrawOrderEnum

ValueDescription
Index = 0

Particles are drawn in the order emitted.

Lifetime = 1

Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front.

CpuParticles2D.EmissionShapeEnum

ValueDescription
DirectedPoints = 5

Particles will be emitted at a position chosen randomly among CpuParticles2D.EmissionPoints. Particle velocity and rotation will be set based on CpuParticles2D.EmissionNormals. Particle color will be modulated by CpuParticles2D.EmissionColors.

Max = 7

Represents the size of the CpuParticles2D.EmissionShapeEnum enum.

Point = 0

All particles will be emitted from a single point.

Points = 4

Particles will be emitted at a position chosen randomly among CpuParticles2D.EmissionPoints. Particle color will be modulated by CpuParticles2D.EmissionColors.

Rectangle = 3

Particles will be emitted in the area of a rectangle.

Ring = 6

Particles will be emitted in the area of a ring parameterized by its outer and inner radius.

Sphere = 1

Particles will be emitted in the volume of a sphere flattened to two dimensions.

SphereSurface = 2

Particles will be emitted on the surface of a sphere flattened to two dimensions.

CpuParticles2D.Parameter

ValueDescription
Angle = 7

Use with CpuParticles2D.SetParamMin, CpuParticles2D.SetParamMax, and CpuParticles2D.SetParamCurve to set angle properties.

AngularVelocity = 1

Use with CpuParticles2D.SetParamMin, CpuParticles2D.SetParamMax, and CpuParticles2D.SetParamCurve to set angular velocity properties.

AnimOffset = 11

Use with CpuParticles2D.SetParamMin, CpuParticles2D.SetParamMax, and CpuParticles2D.SetParamCurve to set animation offset properties.

AnimSpeed = 10

Use with CpuParticles2D.SetParamMin, CpuParticles2D.SetParamMax, and CpuParticles2D.SetParamCurve to set animation speed properties.

Damping = 6

Use with CpuParticles2D.SetParamMin, CpuParticles2D.SetParamMax, and CpuParticles2D.SetParamCurve to set damping properties.

HueVariation = 9

Use with CpuParticles2D.SetParamMin, CpuParticles2D.SetParamMax, and CpuParticles2D.SetParamCurve to set hue variation properties.

InitialLinearVelocity = 0

Use with CpuParticles2D.SetParamMin, CpuParticles2D.SetParamMax, and CpuParticles2D.SetParamCurve to set initial velocity properties.

LinearAccel = 3

Use with CpuParticles2D.SetParamMin, CpuParticles2D.SetParamMax, and CpuParticles2D.SetParamCurve to set linear acceleration properties.

Max = 12

Represents the size of the CpuParticles2D.Parameter enum.

OrbitVelocity = 2

Use with CpuParticles2D.SetParamMin, CpuParticles2D.SetParamMax, and CpuParticles2D.SetParamCurve to set orbital velocity properties.

RadialAccel = 4

Use with CpuParticles2D.SetParamMin, CpuParticles2D.SetParamMax, and CpuParticles2D.SetParamCurve to set radial acceleration properties.

Scale = 8

Use with CpuParticles2D.SetParamMin, CpuParticles2D.SetParamMax, and CpuParticles2D.SetParamCurve to set scale properties.

TangentialAccel = 5

Use with CpuParticles2D.SetParamMin, CpuParticles2D.SetParamMax, and CpuParticles2D.SetParamCurve to set tangential acceleration properties.

CpuParticles2D.ParticleFlags

ValueDescription
AlignYToVelocity = 0

Use with CpuParticles2D.SetParticleFlag to set CpuParticles2D.ParticleFlagAlignY.

DisableZ = 2

Present for consistency with 3D particle nodes, not used in 2D.

Max = 3

Represents the size of the CpuParticles2D.ParticleFlags enum.

RotateY = 1

Present for consistency with 3D particle nodes, not used in 2D.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.