Packageorg.flintparticles.twoD.actions
Classpublic class DeathSpeed
InheritanceDeathSpeed Inheritance ActionBase Inheritance Object

The DeathSpeed action marks the particle as dead if it is travelling faster than the specified speed. The behaviour can be switched to instead mark as dead particles travelling slower than the specified speed.



Public Properties
 PropertyDefined 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
 Inheritedpriority : int
Returns a default priority of 0 for this action.
ActionBase
Protected Properties
 PropertyDefined By
 Inherited_priority : int = 0
ActionBase
Public Methods
 MethodDefined By
  
DeathSpeed(speed:Number, isMinimum:Boolean = false)
The constructor creates a DeathSpeed action for use by an emitter.
DeathSpeed
 Inherited
addedToEmitter(emitter:Emitter):void
This method does nothing.
ActionBase
 Inherited
This method does nothing.
ActionBase
  
update(emitter:Emitter, particle:Particle, time:Number):void
[override] 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
Property Detail
isMinimumproperty
isMinimum:Boolean

Whether the speed is a minimum (true) or maximum (false) speed.


Implementation
    public function get isMinimum():Boolean
    public function set isMinimum(value:Boolean):void
limitproperty 
limit:Number

The speed limit beyond which the particle dies.


Implementation
    public function get limit():Number
    public function set limit(value:Number):void
Constructor Detail
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.

Parameters
speed:Number (default = NaN) — 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

Method Detail
update()method
override public function update(emitter:Emitter, particle:Particle, time:Number):void

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.

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