

Particles.SetEmitterListener("MyEmitter", MyParticleDestroyListener) Print ("EMITTER NAME : ".event.emitterName) Print ("PARTICLE TYPE : ".event.typeName) LISTENER FUNCTION CALLED WHEN PARTICLES HAVE BEEN DESTROYEDįunction MyParticleDestroyListener( event ) Note that this particle is about to die and therefore will be deleted in the next frame or the next time you call Update(). Use GetParticle(particleIndex) to access the particle directly. (String) Name of the particle's particle type. (Number) The particle's current y velocity. (Number) The particle's current x velocity. (Number) The particle's current alpha value. (Number) The particle's current rotation. (Number) Y-position of the particle that is about to die. (Number) X-position of the particle that is about to die. The event object you receive contains the following information: (Function) Function that should be called on event. When an emitter is deleted, it will automatically set its reference to your listener function to "nil", so you don't have to care about this. The event that will be sent to your listener function contains various information about the particle that is about to die (see list below). Prints a list of all existing emitters and their attached particle types into the console window.Įmitters can call listener functions when any of their emitted particles have been killed (expired). If you don't want to store an emitter reference, you can also write GetEmitter("MyEmitter").x = 50 -or with Gideros GetEmitter("MyEmitter"):setX(50), for example. Use SetEmitterScale() to scale all attached particles at once. Note that scaling has no effect on the emitter or its particles. Using this handle, you can freely position, move, rotate the emitter or change it's alpha value (particles will inherit the emitter's current alpha value). Returns a handle to the specified emitter (which is actually a display object). (Boolean) True if the specified emitter is still firing, otherwise false. Otherwise, they cannot be garbage collected and will remain in memory! So be careful when storing emitter handles on your own!Ĭhecks if an emitter is still emitting any particles. If you stored any emitter handles using GetEmitter(), you must set these references to the emitters to "nil" before you delete the emitters. (Number) Emission rate (particles per second). (String) Name of an existing particle type (must have been attached to the specified emitter). True: Emitter will be removed automatically when finished emission (NOTE! You must set all your references to this emitter to "nil" before, otherwise the emitter will stay in memory!).Ĭhanges the emission rate (particles per second) of a particle type that has been attached to the specified emitter.ĬhangeEmissionRate("emitterName", "particleName", emissionRate) True: Emitter will restart automatically when finished (Number) Emitter's initial rotation angle (0.360). (Number) Emitter's initial x- and y-coordinate. If set to visible, you will see an arrow symbol that represents the emitter's position and rotation.ĬreateEmitter("name", x,y, rotation, visible, loop, autoDestroy) You can also specify an automatic rotation speed or let a particle be automatically motion-aligned (particle will always point into its travel direction then).īeside system memory and performance, there is no limit on the number of emitters you use.Ĭreates an emitter.

A particle features several different rotation modes: by default, it inherits the emitter's rotation. Particles will be emitted into the direction where the emitter points, at a specified speed. All emitted particles of this emitter will inherit the emitter's current alpha then. You can also set an emitter's alpha as with any other display object. Emitters can be used like display objects, they can be positioned, moved and rotated. It's a good practice to create your emitters before level start, re-use them during the game and remove them after the level or game finished.
#Gideros text field professional
Lightning fast, professional GUI extension to add all kind of graphical user interfaces to your apps and games.īUNDLE OFFER: BUY ONE, GET THE OTHERS HALF OFF!


#Gideros text field full
:: X-PRESSIVE.COM :: - PARTICLE CANDY FOR CORONA® & GIDEROS® iOS / ANDROID SDKĬreate stunning visual effects with our full featured particle engine for the Corona & Gideros SDK.
