Skip to content
Andrew Gleeson edited this page Jan 5, 2022 · 2 revisions

Index

Basic Methods

Layers/Depth

Particles

Update/Drawing


Basic Methods

exists()

Returns: Boolean

Returns whether this particle system exists.

clear()

Returns: N/A

Clears all associated emitters/particles, resets depth/position.

destroy()

Returns: N/A

Removes particle system from memory, destroying all associated emitters/particles.

destroyEmitters()

Returns: N/A

Removes all associated emitters from memory.

clearParticles()

Returns: N/A

Clear all associated 'alive' particles.

Layers/Depth

createLayer( layerid, persistent)

Returns: self

Generates a new ParticleSystem that can be made persistent between rooms, as well as defining a new layer to set it to.

getLayer()

Returns: Layer ID

Retrieve unique layer ID for this particle system, if manually assigned (otherwise returns 0).

setLayer( layerID)

Returns: self

Switch the current ParticleSystem to a new layer.

setDepth( depth)

Returns: self

Sets the draw depth of the particle system, same as 'layer depth'.

position( x, y)

Returns: self

Updates the ParticleSytem's 'origin' position (default: 0,0). (Emitter positions/regions are offsets of this origin position)

Particles

createParticle( x, y, type, num)

Returns: self

Creates a particle (without using an emitter).

getCount()

Returns: Integer

Returns the total number of alive particles attached to this ParticleSystem.

Update/Drawing

update()

Returns: N/A

Updates the ParticleSystem and all associated emitters/particles. (Typically used when autoUpdate = false)

draw()

Returns: N/A

Runs the Draw Event for this ParticleSystem. (Typically used when autoDraw = false)

autoUpdate( auto)

Returns: N/A

Enables/Disables automatic updating of this ParticleSystem.

autoDraw( auto)

Returns: N/A

Enables/Disables automatic drawing of this ParticleSystem.

drawOrder( frontToBack)

Returns: self

Toggle whether newer particles should be drawn in front of old ones.