new DeathZone(source, killOnEnter)
Parameters:
| Name | Type | Description |
|---|---|---|
source |
Phaser.Types.GameObjects.Particles.DeathZoneSource | An object instance that has a |
killOnEnter |
boolean | Should the Particle be killed when it enters the zone? |
- Since: 3.0.0
- Source: src/gameobjects/particles/zones/DeathZone.js (Line 9)
Members
-
killOnEnter :boolean
-
Set to
trueif the Particle should be killed if it enters this zone. Set tofalseto kill the Particle if it leaves this zone.Type:
- boolean
- Since: 3.0.0
- Source: src/gameobjects/particles/zones/DeathZone.js (Line 42)
-
source :Phaser.Types.GameObjects.Particles.DeathZoneSource
-
An object instance that has a
containsmethod that returns a boolean when givenxandyarguments. This could be a Geometry shape, such asPhaser.Geom.Circle, or your own custom object.Type:
- Since: 3.0.0
- Source: src/gameobjects/particles/zones/DeathZone.js (Line 32)
Methods
-
willKill(particle)
-
Checks if the given Particle will be killed or not by this zone.
Parameters:
Name Type Description particlePhaser.GameObjects.Particles.Particle The Particle to be checked against this zone.
- Since: 3.0.0
- Source: src/gameobjects/particles/zones/DeathZone.js (Line 53)
Returns:
Return
trueif the Particle is to be killed, otherwise returnfalse.- Type
- boolean
