Adds a new Particle Death Zone to this Emitter.
A particle is immediately killed as soon as its x/y coordinates intersect with any of the configured Death Zones.
The source
can be a Geometry Shape, such as a Circle, Rectangle or Triangle.
Any valid object from the Phaser.Geometry
namespace is allowed, as long as
it supports a contains
function. You can set the type
to be either onEnter
or onLeave
.
A single Death Zone instance can only exist once within this Emitter, but can belong to multiple Emitters.
name | type | description |
---|---|---|
config | Phaser.Types.GameObjects.Particles.DeathZoneObject | Array.<Phaser.Types.GameObjects.Particles.DeathZoneObject> |
A Death Zone configuration object, a Death Zone instance, a valid Geometry object or an array of them. |
The Death Zone that was added to this Emitter.