Difference between revisions of "ParticleSystem (Português)"

(versão inicial em Português)
 
m (atualização na lista de funções)
Line 6: Line 6:
 
| ?Description
 
| ?Description
 
}}
 
}}
 +
ParticleSystem:getOffsetY Get the y coordinate of the particle rotation offset.
 +
 +
ParticleSystem:getSpread Gets the amount of directional spread of the particle emitter (in radians).
 +
 +
ParticleSystem:getX Gets the x-coordinate of the particle emitter's position.
 +
 +
ParticleSystem:getY Gets the y-coordinate of the particle emitter's position.
 +
 +
ParticleSystem:isActive Checks whether the particle system is actively emitting particles.
 +
 +
ParticleSystem:isEmpty Checks whether the particle system is empty of particles.
 +
 +
ParticleSystem:isFull Checks whether the particle system is full of particles.
 +
 +
ParticleSystem:pause Pauses the particle emitter.
 +
 +
ParticleSystem:reset Resets the particle emitter, removing any existing particles and resetting the lifetime counter.
 +
 +
ParticleSystem:setBufferSize Sets the size of the buffer (the max allowed amount of particles in the system).
 +
 +
ParticleSystem:setColor Sets the color of the image (color modulation needs to be activated for it to have any effect).
 +
 +
ParticleSystem:setDirection Sets the direction the particles will be emitted in.
 +
 +
ParticleSystem:setEmissionRate Sets the amount of particles emitted per second.
 +
 +
ParticleSystem:setGravity Sets the gravity affecting the particles (acceleration along the y-axis).
 +
 +
ParticleSystem:setLifetime Sets how long the particle system should emit particles (if -1 then it emits particles forever).
 +
 +
ParticleSystem:setOffset Set the offset position which the particle sprite is rotated around.
 +
 +
ParticleSystem:setParticleLife Sets the life of the particles.
 +
 +
ParticleSystem:setPosition Sets the position of the emitter.
 +
 +
ParticleSystem:setRadialAcceleration Set the radial acceleration (away from the emitter).
 +
 +
ParticleSystem:setRotation Sets the rotation of the image upon particle creation (in radians).
 +
 +
ParticleSystem:setSize Sets the size of the particle (1.0 being normal size).
 +
 +
ParticleSystem:setSizeVariation Sets the degree of variation (0 meaning no variation and 1 meaning full variation between start and end).
 +
 +
ParticleSystem:setSpeed Sets the speed of the particles.
 +
 +
ParticleSystem:setSpin Sets the spin of the sprite.
 +
 +
ParticleSystem:setSpinVariation Sets the degree of variation (0 meaning no variation and 1 meaning full variation between start and end).
 +
 +
ParticleSystem:setSpread Sets the amount of spread for the system.
 +
 +
ParticleSystem:setSprite Sets the image which is to be emitted.
 +
 +
ParticleSystem:setTangentialAcceleration Sets the tangential acceleration (acceleration perpendicular to the particle's direction).
 +
 +
ParticleSystem:start Starts the particle emitter.
 +
 +
ParticleSystem:stop Stops the particle emitter, resetting the lifetime counter.
 +
 +
ParticleSystem:update Updates the particle system; moving, creating and killing particles.
 +
 
== Supertipos ==
 
== Supertipos ==
 
[[Drawable (Português)]]
 
[[Drawable (Português)]]

Revision as of 20:22, 6 January 2011

Usado para criar efeitos legais, como fogo. Os sistemas de partículas são criados e desenhados na tela usando funções do love.graphics. Eles também precisam ser atualizados no callback update(dt) para que as mudanças mas partículas emitidas sejam vistas.

Funções

ParticleSystem:count (Português)Obtém a quantidade de partículas que estão atualmente no sistema.
ParticleSystem:getDirection (Português)Obtém a direção de um emissor de partículas (em radianos).
ParticleSystem:getOffsetX (Português)Obtém a coordenada x do deslocamento de rotação da partícula
ParticleSystem:getOffsetY (Português)Obtém a coordenada y do deslocamento de rotação da partícula.
ParticleSystem:getSpread (Português)Obtém o ângulo de espalhamento do emissor de partículas (em radianos).
ParticleSystem:getX (Português)Obtém a coordenada x da posição do emissor de partículas.
ParticleSystem:getY (Português)Obtém a coordenada y da posição do emissor de partículas.
ParticleSystem:isActive (Português)Verifica se o sistema de partículas está emitindo partículas.
ParticleSystem:isEmpty (Português)Verifica se o sistema de partículas está vazio.
ParticleSystem:isFull (Português)Verifica se o sistema de partículas está cheio.
ParticleSystem:pause (Português)Pausa o emissor de partículas.
ParticleSystem:reset (Português)Reinicializa o emissor de partículas, removendo qualquer partícula existente e apagando o contador de tempo de vida.
ParticleSystem:setBufferSize (Português)Configura o tamanho do buffer (a quantidade máxima permitida de partículas no sistema).
ParticleSystem:setColor (Português)Configura a cor da imagem (a modulação da cor necessita estar ativa para ter algum efeito).
ParticleSystem:setDirection (Português)Configura a direção em que as partículas serão emitidas.
ParticleSystem:setEmissionRate (Português)Configura a quantidade de partículas emitidas por segundo.
ParticleSystem:setGravity (Português)Configura a gravidade que afeta as partículas (aceleração ao longo do eixo y).
ParticleSystem:setLifetime (Português)Configura por quanto tempo o sistema de partículas pode emitir partículas (se -1 então as partículas serão emitidas para sempre).
ParticleSystem:setOffset (Português)Configura o deslocamento da posição em que a entidade gráfica da partícula será rotacionada em volta.
ParticleSystem:setParticleLife (Português)Configura a vida das partículas.
ParticleSystem:setPosition (Português)Configura a posição do emissor.
ParticleSystem:setRadialAcceleration (Português)Configura a aceleração radial (afastando-se do emissor).
ParticleSystem:setRotation (Português)Configura a rotação da imagem em consequência da criação da partícula (em radianos).
ParticleSystem:setSize (Português)Configura o tamanho da partícula (1.0 é o tamanho normal).
ParticleSystem:setSizeVariation (Português)Configura o grau de variação (0 significa que não haverá variação e 1 significa variação completa entre o início e o final).
ParticleSystem:setSpeed (Português)Configura a velocidade das partículas.
ParticleSystem:setSpin (Português)Configura a rotação de uma entidade gráfica.
ParticleSystem:setSpinVariation (Português)Configura o grau de variação (0 significa que não haverá variação e 1 significa variação completa entre o início e o final).
ParticleSystem:setSpread (Português)Configura a quantidade de espalhamento para o sistema.
ParticleSystem:setSprite (Português)Configura a imagem que irá ser emitida.
ParticleSystem:setTangentialAcceleration (Português)Configura a aceleração tangencial (aceleração perpendicular à direção da partícula).
ParticleSystem:start (Português)Inicia o emissor de partículas.
ParticleSystem:stop (Português)Para o emissor de partículas, reconfigurando o contador de tempo de vida.
ParticleSystem:update (Português)Atualiza o sistema de partículas; movendo, criando e matando partículas.

ParticleSystem:getOffsetY Get the y coordinate of the particle rotation offset.

ParticleSystem:getSpread Gets the amount of directional spread of the particle emitter (in radians).

ParticleSystem:getX Gets the x-coordinate of the particle emitter's position.

ParticleSystem:getY Gets the y-coordinate of the particle emitter's position.

ParticleSystem:isActive Checks whether the particle system is actively emitting particles.

ParticleSystem:isEmpty Checks whether the particle system is empty of particles.

ParticleSystem:isFull Checks whether the particle system is full of particles.

ParticleSystem:pause Pauses the particle emitter.

ParticleSystem:reset Resets the particle emitter, removing any existing particles and resetting the lifetime counter.

ParticleSystem:setBufferSize Sets the size of the buffer (the max allowed amount of particles in the system).

ParticleSystem:setColor Sets the color of the image (color modulation needs to be activated for it to have any effect).

ParticleSystem:setDirection Sets the direction the particles will be emitted in.

ParticleSystem:setEmissionRate Sets the amount of particles emitted per second.

ParticleSystem:setGravity Sets the gravity affecting the particles (acceleration along the y-axis).

ParticleSystem:setLifetime Sets how long the particle system should emit particles (if -1 then it emits particles forever).

ParticleSystem:setOffset Set the offset position which the particle sprite is rotated around.

ParticleSystem:setParticleLife Sets the life of the particles.

ParticleSystem:setPosition Sets the position of the emitter.

ParticleSystem:setRadialAcceleration Set the radial acceleration (away from the emitter).

ParticleSystem:setRotation Sets the rotation of the image upon particle creation (in radians).

ParticleSystem:setSize Sets the size of the particle (1.0 being normal size).

ParticleSystem:setSizeVariation Sets the degree of variation (0 meaning no variation and 1 meaning full variation between start and end).

ParticleSystem:setSpeed Sets the speed of the particles.

ParticleSystem:setSpin Sets the spin of the sprite.

ParticleSystem:setSpinVariation Sets the degree of variation (0 meaning no variation and 1 meaning full variation between start and end).

ParticleSystem:setSpread Sets the amount of spread for the system.

ParticleSystem:setSprite Sets the image which is to be emitted.

ParticleSystem:setTangentialAcceleration Sets the tangential acceleration (acceleration perpendicular to the particle's direction).

ParticleSystem:start Starts the particle emitter.

ParticleSystem:stop Stops the particle emitter, resetting the lifetime counter.

ParticleSystem:update Updates the particle system; moving, creating and killing particles.

Supertipos

Drawable (Português)

Veja Também

Outros Idiomas