| Package | org.flintparticles.twoD.actions |
| Class | public class DeathSpeed |
| Inheritance | DeathSpeed ActionBase |
| Property | Defined by | ||
|---|---|---|---|
| isMinimum : Boolean
Whether the speed is a minimum (true) or maximum (false) speed.
| DeathSpeed | ||
| limit : Number
The speed limit beyond which the particle dies.
| DeathSpeed | ||
![]() | priority : int
Returns a default priority of 0 for this action.
| ActionBase | |
| Method | Defined by | ||
|---|---|---|---|
|
DeathSpeed(speed:Number, isMinimum:Boolean = false)
The constructor creates a DeathSpeed action for use by an emitter.
| DeathSpeed | ||
![]() |
addedToEmitter(emitter:Emitter):void
This method does nothing.
| ActionBase | |
![]() |
removedFromEmitter(emitter:Emitter):void
This method does nothing.
| ActionBase | |
|
Checks the particle's speed and marks it as dead if it is moving faster
than the speed limit, if this is a mximum speed limit, or slower if
this is a minimum speed limit.
| DeathSpeed | ||
| isMinimum | property |
isMinimum:Boolean [read-write]Whether the speed is a minimum (true) or maximum (false) speed.
Implementation public function get isMinimum():Boolean
public function set isMinimum(value:Boolean):void
| limit | property |
limit:Number [read-write]The speed limit beyond which the particle dies.
Implementation public function get limit():Number
public function set limit(value:Number):void
| DeathSpeed | () | constructor |
public function DeathSpeed(speed:Number, isMinimum:Boolean = false)The constructor creates a DeathSpeed action for use by an emitter. To add a DeathSpeed to all particles created by an emitter, use the emitter's addAction method.
Parametersspeed:Number — The speed limit for the action in pixels per second.
|
|
isMinimum:Boolean (default = false) — If true, particles travelling slower than the speed limit
are killed, otherwise particles travelling faster than the speed limit are
killed.
|
See also
| update | () | method |
public override function update(emitter:Emitter, particle:Particle, time:Number):voidChecks the particle's speed and marks it as dead if it is moving faster than the speed limit, if this is a mximum speed limit, or slower if this is a minimum speed limit.
This method is called by the emitter and need not be called by the user
Parametersemitter: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