| Package | org.flintparticles.twoD.actions |
| Class | public class DeathZone |
| Inheritance | DeathZone ActionBase Object |
Default MXML Propertyzone
| Property | Defined By | ||
|---|---|---|---|
![]() | priority : int
Returns a default priority of 0 for this action. | ActionBase | |
| zone : Zone2D
The zone. | DeathZone | ||
| zoneIsSafe : Boolean
If true, the zone is treated as the safe area and particles ouside the
zone are killed. | DeathZone | ||
| Method | Defined By | ||
|---|---|---|---|
The constructor creates a DeathZone action for use by an emitter. | DeathZone | ||
![]() | addedToEmitter(emitter:Emitter):void
This method does nothing. | ActionBase | |
![]() | removedFromEmitter(emitter:Emitter):void
This method does nothing. | ActionBase | |
[override]
Checks whether the particle is inside the zone and kills it if it is
in the DeathZone region. | DeathZone | ||
| zone | property |
zone:Zone2DThe zone.
public function get zone():Zone2D public function set zone(value:Zone2D):void| zoneIsSafe | property |
zoneIsSafe:BooleanIf true, the zone is treated as the safe area and particles ouside the zone are killed. If false, particles inside the zone are killed.
public function get zoneIsSafe():Boolean public function set zoneIsSafe(value:Boolean):void| DeathZone | () | Constructor |
public function DeathZone(zone:Zone2D = null, zoneIsSafe:Boolean = false)The constructor creates a DeathZone action for use by an emitter. To add a DeathZone to all particles created by an emitter, use the emitter's addAction method.
Parameterszone:Zone2D (default = null) — The zone to use. Any item from the
org.flintparticles.twoD.zones package can be used.
| |
zoneIsSafe:Boolean (default = false) — If true, the zone is treated as the safe area
and particles outside the zone are killed. If false, particles
inside the zone are killed.
|
See also
| update | () | method |
override public function update(emitter:Emitter, particle:Particle, time:Number):voidChecks whether the particle is inside the zone and kills it if it is in the DeathZone region.
This method is called by the emitter and need not be called by the user.
Parameters
emitter:Emitter — The Emitter that created the particle.
| |
particle:Particle — The particle to be updated.
| |
time:Number — The duration of the frame - used for time based updates.
|
See also