Packageorg.flintparticles.common.actions
Classpublic class ChangeCollisionRadius
InheritanceChangeCollisionRadius Inheritance ActionBase Inheritance Object

The ChangeCollisionRadius action adjusts the collision radius of the particle as it ages. It uses the particle's energy level to decide what radius the particle should have.

Usually a particle's energy changes from 1 to 0 over its lifetime, but this can be altered via the easing function set within the age action.

This action should be used in conjunction with the Age action.

See also

org.flintparticles.common.actions.Action
org.flintparticles.common.actions.Age


Public Properties
 PropertyDefined By
  endRadius : Number
The collision radius for the particle when its energy is 0 - usually at the end of its lifetime.
ChangeCollisionRadius
 Inheritedpriority : int
Returns a default priority of 0 for this action.
ActionBase
  startRadius : Number
The collision radius for the particle when its energy is 1 - usually at the start of its lifetime.
ChangeCollisionRadius
Protected Properties
 PropertyDefined By
 Inherited_priority : int = 0
ActionBase
Public Methods
 MethodDefined By
  
ChangeCollisionRadius(startRadius:Number = 1, endRadius:Number = 1)
The constructor creates a ChangeCollisionRadius action for use by an emitter.
ChangeCollisionRadius
 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] Sets the collision radius of the particle based on the values defined and the particle's energy level.
ChangeCollisionRadius
Property Detail
endRadiusproperty
endRadius:Number

The collision radius for the particle when its energy is 0 - usually at the end of its lifetime.


Implementation
    public function get endRadius():Number
    public function set endRadius(value:Number):void
startRadiusproperty 
startRadius:Number

The collision radius for the particle when its energy is 1 - usually at the start of its lifetime.


Implementation
    public function get startRadius():Number
    public function set startRadius(value:Number):void
Constructor Detail
ChangeCollisionRadius()Constructor
public function ChangeCollisionRadius(startRadius:Number = 1, endRadius:Number = 1)

The constructor creates a ChangeCollisionRadius action for use by an emitter. To add a Radius to all particles created by an emitter, use the emitter's addAction method.

Parameters
startRadius:Number (default = 1) — The collision radius for the particle when its energy is 1 - usually at the start of its lifetime.
 
endRadius:Number (default = 1) — The collision radius for the particle when its energy is 0 - usually at the end of its lifetime.

See also

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

Sets the collision radius of the particle based on the values defined and the particle's energy level.

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