Advances the emitter particle simulation.
- iOS 7.0+
- macOS 10.9+
- tvOS 9.0+
- watchOS 3.0+
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,
advance 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.
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.