ParticleSystem (Русский)

Используется для создания различных эффектов вроде огня. Система частиц создается и выводится на экран с помощью функций из love.graphics. Также они должны быть обновлены в функции update(dt), если вы намереваетесь увидеть хоть какие-то изменения по времени.

Функции

Canvas Off-screen render target.
Framebuffer Off-screen render target.
Image Drawable image type.
ParticleSystem Used to create cool effects, like fire.
ParticleSystem:count Gets the amount of particles that are currently in the system.
ParticleSystem:getDirection Gets the direction of the particle emitter (in radians).
ParticleSystem:getOffsetX Get the x coordinate of the particle rotation offset.
ParticleSystem:getOffsetY Get the y coordinate of the particle rotation offset.
ParticleSystem:getPosition Gets the position of the emitter.
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:setColors Sets the colors to apply to the particle sprite.
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:setSizes Sets the sizes of the particle over its lifetime.
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.
SpriteBatch Store geometry in a buffer, and draw it in one call.

Базовый тип

Drawable_(Русский)

Смотрите также

Другие языки

Personal tools