Difference between revisions of "ParticleSystem"

m
Line 2: Line 2:
 
The particle systems are created and drawn on the screen using functions in love.graphics. They also need to be updated in the update(dt) callback for you to see any changes in the particles emitted.
 
The particle systems are created and drawn on the screen using functions in love.graphics. They also need to be updated in the update(dt) callback for you to see any changes in the particles emitted.
 
== Constructors ==
 
== Constructors ==
{{#ask: [[Category:Functions]] [[Constructs::ParticleSystem]] [[Since::<071]]
+
{{#ask: [[Category:Functions]] [[Constructs::ParticleSystem]] [[Concept:Current]]
 
| headers=hide
 
| headers=hide
 
| default=None.
 
| default=None.
Line 8: Line 8:
 
}}
 
}}
 
== Functions ==
 
== Functions ==
{{#ask: [[Category:Functions]] [[parent::ParticleSystem||Drawable||Object]] [[Since::<071]]
+
{{#ask: [[Category:Functions]] [[parent::ParticleSystem||Drawable||Object]] [[Concept:Current]]
 
| headers=hide
 
| headers=hide
 
| ?Description
 
| ?Description

Revision as of 22:57, 23 June 2012

Used to create cool effects, like fire. The particle systems are created and drawn on the screen using functions in love.graphics. They also need to be updated in the update(dt) callback for you to see any changes in the particles emitted.

Constructors

love.graphics.newParticleSystemCreates a new ParticleSystem.

Functions

Object:releaseImmediately destroys the object's Lua reference.
Object:typeGets the type of the object as a string.
Object:typeOfChecks whether an object is of a certain type.
ParticleSystem:cloneCreates an identical copy of the ParticleSystem in the stopped state.
ParticleSystem:countGets the amount of particles that are currently in the system.
ParticleSystem:emitEmits a burst of particles from the particle emitter.
ParticleSystem:getAreaSpreadGets the area-based spawn parameters for the particles.
ParticleSystem:getBufferSizeGets the maximum number of particles the ParticleSystem can have at once.
ParticleSystem:getColorsGets the colors to apply to the particle sprite.
ParticleSystem:getCountGets the number of particles that are currently in the system.
ParticleSystem:getDirectionGets the direction of the particle emitter (in radians).
ParticleSystem:getEmissionAreaGets the area-based spawn parameters for the particles.
ParticleSystem:getEmissionRateGets the amount of particles emitted per second.
ParticleSystem:getEmitterLifetimeGets how long the particle system will emit particles
ParticleSystem:getImageGets the image used for the particles.
ParticleSystem:getInsertModeGets the mode used when the ParticleSystem adds new particles.
ParticleSystem:getLinearAccelerationGets the linear acceleration (acceleration along the x and y axes) for particles.
ParticleSystem:getLinearDampingGets the amount of linear damping (constant deceleration) for particles.
ParticleSystem:getOffsetGets the particle image's draw offset.
ParticleSystem:getOffsetXGet the x coordinate of the particle rotation offset.
ParticleSystem:getOffsetYGet the y coordinate of the particle rotation offset.
ParticleSystem:getParticleLifetimeGets the lifetime of the particles.
ParticleSystem:getPositionGets the position of the emitter.
ParticleSystem:getQuadsGets a series of Quads used for the particle sprites.
ParticleSystem:getRadialAccelerationGets the radial acceleration (away from the emitter).
ParticleSystem:getRotationGets the rotation of the image upon particle creation (in radians).
ParticleSystem:getSizeVariationGets the amount of size variation.
ParticleSystem:getSizesGets the sizes of the particle over its lifetime.
ParticleSystem:getSpeedGets the speed of the particles.
ParticleSystem:getSpinGets the spin of the sprite.
ParticleSystem:getSpinVariationGets the amount of spin variation.
ParticleSystem:getSpreadGets the amount of directional spread of the particle emitter (in radians).
ParticleSystem:getTangentialAccelerationGets the tangential acceleration (acceleration perpendicular to the particle's direction).
ParticleSystem:getTextureGets the texture (Image or Canvas) used for the particles.
ParticleSystem:getXGets the x-coordinate of the particle emitter's position.
ParticleSystem:getYGets the y-coordinate of the particle emitter's position.
ParticleSystem:hasRelativeRotationGets whether particle angles and rotations are relative to their velocities.
ParticleSystem:isActiveChecks whether the particle system is actively emitting particles.
ParticleSystem:isEmptyChecks whether the particle system is empty of particles.
ParticleSystem:isFullChecks whether the particle system is full of particles.
ParticleSystem:isPausedChecks whether the particle system is paused.
ParticleSystem:isStoppedChecks whether the particle system is stopped.
ParticleSystem:moveToMoves the position of the emitter.
ParticleSystem:pausePauses the particle emitter.
ParticleSystem:resetResets the particle emitter, removing existing particles and resetting the lifetime counter.
ParticleSystem:setAreaSpreadSets area-based spawn parameters for the particles.
ParticleSystem:setBufferSizeSets the size of the buffer (the max allowed amount of particles in the system).
ParticleSystem:setColorSets the color of the image.
ParticleSystem:setColorsSets the colors to apply to the particle sprite.
ParticleSystem:setDirectionSets the direction the particles will be emitted in.
... further results

Supertypes

See Also


Other Languages