Phaser API Documentation

  Version: 
setEmitZone(zone)

Description:

Changes the currently active Emission Zone. The zones should have already been added to this Emitter either via the emitter config, or the addEmitZone method.

Call this method by passing either a numeric zone index value, or the zone instance itself.

Prior to v3.60 an Emitter could only have a single Emit Zone and this method was how you set it. From 3.60 and up it now performs a different function and swaps between all available active zones.

Parameters:

name type description
zone number | Phaser.GameObjects.Particles.Zones.EdgeZone | Phaser.GameObjects.Particles.Zones.RandomZone

The Emit Zone to set as the active zone.

Returns:
Description:

This Particle Emitter.