Packageorg.flintparticles.common.actions
Classpublic class TargetScale
InheritanceTargetScale Inheritance ActionBase Inheritance Object

The TargetScale action adjusts the scale of the particle towards a target scale. On every update the scale of the particle moves a little closer to the target scale. The rate at which particles approach the target is controlled by the rate property.



Public Properties
 PropertyDefined By
 Inheritedpriority : int
Returns a default priority of 0 for this action.
ActionBase
  rate : Number
Adjusts how quickly the particle reaches the target scale.
TargetScale
  targetScale : Number
The target scale for the particle.
TargetScale
Protected Properties
 PropertyDefined By
 Inherited_priority : int = 0
ActionBase
Public Methods
 MethodDefined By
  
TargetScale(targetScale:Number = 1, rate:Number = 0.1)
The constructor creates a TargetScale action for use by an emitter.
TargetScale
 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] Adjusts the scale of the particle based on its current scale, the target scale and the time elapsed.
TargetScale
Property Detail
rateproperty
rate:Number

Adjusts how quickly the particle reaches the target scale. Larger numbers cause it to approach the target scale more quickly.


Implementation
    public function get rate():Number
    public function set rate(value:Number):void
targetScaleproperty 
targetScale:Number

The target scale for the particle. 1 is normal size.


Implementation
    public function get targetScale():Number
    public function set targetScale(value:Number):void
Constructor Detail
TargetScale()Constructor
public function TargetScale(targetScale:Number = 1, rate:Number = 0.1)

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

Parameters
targetScale:Number (default = 1) — The target scale for the particle. 1 is normal size.
 
rate:Number (default = 0.1) — Adjusts how quickly the particle reaches the target scale. Larger numbers cause it to approach the target scale more quickly.

See also

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

Adjusts the scale of the particle based on its current scale, the target scale and the time elapsed.

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