Instance Method


Advances the emitter particle simulation.


- (void)advanceSimulationTime:(NSTimeInterval)sec;



The number of seconds to simulate.


Once added to a scene, an emitter node automatically creates new particles in new animation frames. This method allows you to artificially advance a running emitter’s simulation, causing it to generate new particles and advance any existing particles. The most common use for this method is to prepopulate an emitter node with particles after it is first added to a scene.

If an emitter is paused, either directly or by one of its parent nodes being paused, advanceSimulationTime: has no effect. Listing 1 shows how to advance an emitter object while it is paused, by temporarily toggling its paused property while advancing the simulation.

Listing 1

Temporarily unpausing an emitter to advance simulation time

let emitter = SKEmitterNode()
let emitterPaused = emitter.isPaused
if emitterPaused {
    emitter.isPaused = false
if emitterPaused {
    emitter.isPaused = true

Note that the paused property is inherited from a node’s parents, so even if the emitter hasn’t been explicitly paused but, for example, the scene has, this code will still work.

See Also

Controlling When Particles Are Created

- resetSimulation

Removes all existing particles and restarts the simulation.


The rate at which new particles are created.


The number of particles the emitter should emit before stopping.