2D particle emitter.
    public class Particles2D : Node2D

2D particle node used to create a variety of particle systems and effects. Particles2D features an emitter that generates some number of particles at a given rate.

Use the process_material property to add a ParticlesMaterial to configure particle appearance and behavior. Alternatively, you can add a ShaderMaterial which will be applied to all particles.

Inheritance Chain

Constructors

    public Particles2D()

Properties

    public int Amount { get; set; }

Number of particles emitted in one emission cycle.

    public DrawOrderEnum DrawOrder { get; set; }

Particle draw order. Uses DRAW_ORDER_* values. Default value: DRAW_ORDER_INDEX.

    public bool Emitting { get; set; }

If true particles are being emitted. Default value: true.

    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. Default value: 0.

    public int FixedFps { get; set; }

    public bool FractDelta { get; set; }

    public int HFrames { get; set; }

Number of horizontal frames in texture.

    public float Lifetime { get; set; }

Amount of time each particle will exist. Default value: 1.

    public bool LocalCoords { get; set; }

If true particles use the parent node’s coordinate space. If false they use global coordinates. Default value: true.

    public Texture NormalMap { get; set; }

    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. Default value: false.

    public float Preprocess { get; set; }

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

    public Material ProcessMaterial { get; set; }

Material for processing particles. Can be a ParticlesMaterial or a ShaderMaterial.

    public float Randomness { get; set; }

Emission lifetime randomness ratio. Default value: 0.

    public float SpeedScale { get; set; }

Particle system’s running speed scaling ratio. Default value: 1.

    public Texture Texture { get; set; }

Particle texture. If null particles will be squares.

    public int VFrames { get; set; }

Number of vertical frames in texture.

    public Rect2 VisibilityRect { get; set; }

Editor visibility helper.

Methods

    public Rect2 CaptureRect()

    public int GetAmount()

Getter for Amount

    public DrawOrderEnum GetDrawOrder()

Getter for DrawOrder

    public float GetExplosivenessRatio()

Getter for Explosiveness

    public int GetFixedFps()

Getter for FixedFps

    public bool GetFractionalDelta()

Getter for FractDelta

    public int GetHFrames()

Getter for HFrames

    public float GetLifetime()

Getter for DrawOrderEnum.Lifetime

    public Texture GetNormalMap()

Getter for NormalMap

    public bool GetOneShot()

Getter for OneShot

    public float GetPreProcessTime()

Getter for Preprocess

    public Material GetProcessMaterial()

Getter for ProcessMaterial

    public float GetRandomnessRatio()

Getter for Randomness

    public float GetSpeedScale()

Getter for SpeedScale

    public Texture GetTexture()

Getter for Texture

    public bool GetUseLocalCoordinates()

Getter for LocalCoords

    public int GetVFrames()

Getter for VFrames

    public Rect2 GetVisibilityRect()

Getter for VisibilityRect

    public bool IsEmitting()

Getter for Emitting

    public void Restart()

    public void SetAmount(int amount)

Setter for Amount

    public void SetDrawOrder(DrawOrderEnum order)

Setter for DrawOrder

    public void SetEmitting(bool emitting)

Setter for Emitting

    public void SetExplosivenessRatio(float ratio)

Setter for Explosiveness

    public void SetFixedFps(int fps)

Setter for FixedFps

    public void SetFractionalDelta(bool enable)

Setter for FractDelta

    public void SetHFrames(int frames)

Setter for HFrames

    public void SetLifetime(float secs)

Setter for DrawOrderEnum.Lifetime

    public void SetNormalMap(Texture texture)

Setter for NormalMap

    public void SetOneShot(bool secs)

Setter for OneShot

    public void SetPreProcessTime(float secs)

Setter for Preprocess

    public void SetProcessMaterial(Material material)

Setter for ProcessMaterial

    public void SetRandomnessRatio(float ratio)

Setter for Randomness

    public void SetSpeedScale(float scale)

Setter for SpeedScale

    public void SetTexture(Texture texture)

Setter for Texture

    public void SetUseLocalCoordinates(bool enable)

Setter for LocalCoords

    public void SetVFrames(int frames)

Setter for VFrames

    public void SetVisibilityRect(Rect2 aabb)

Setter for VisibilityRect

Inner Types

DrawOrderEnum

Name Value Description
Index 0 Particles are drawn in the order emitted.
Lifetime 1 Particles are drawn in order of remaining lifetime.
Tags: