Packageorg.flintparticles.common.actions
Classpublic class ActionBase
InheritanceActionBase Inheritance Object
Implements Action
Subclasses Accelerate, Age, ApproachNeighbours, BoundingBox, ChangeCollisionRadius, ChangeMass, Collide, CollisionZone, ColorChange, DeathSpeed, DeathZone, Explosion, Fade, Friction, GravityWell, Jet, KeyDownAction, LinearDrag, MatchRotateVelocity, MatchVelocity, MinimumDistance, MouseGravity, Move, MutualGravity, QuadraticDrag, RandomDrift, Rotate, RotateToDirection, RotationalFriction, RotationalLinearDrag, RotationalQuadraticDrag, ScaleAll, ScaleImage, SpeedLimit, TargetColor, TargetRotateVelocity, TargetScale, TargetVelocity, TurnAwayFromMouse, TurnTowardsMouse, TurnTowardsPoint, TweenPosition, TweenToCurrentPosition, TweenToZone, WrapAroundBox, ZonedAction

The ActionBase class is the abstract base class for all particle actions in the Flint library. It implements the Action interface with a default priority of zero and empty methods for the rest of the interface.

Instances of the ActionBase class should not be directly created because the ActionBase class itself simply implements the Action interface with default methods that do nothing.

Developers creating custom actions may either extend the ActionBase class or implement the Action interface directly. Classes that extend the ActionBase class need only to implement their own functionality for the methods they want to use, leaving other methods with their default empty implementations.

See also

org.flintparticles.common.emitters.Emitter.addAction()


Public Properties
 PropertyDefined By
  priority : int
Returns a default priority of 0 for this action.
ActionBase
Protected Properties
 PropertyDefined By
  _priority : int = 0
ActionBase
Public Methods
 MethodDefined By
  
The constructor creates an ActionBase object.
ActionBase
  
addedToEmitter(emitter:Emitter):void
This method does nothing.
ActionBase
  
This method does nothing.
ActionBase
  
update(emitter:Emitter, particle:Particle, time:Number):void
This method does nothing.
ActionBase
Property Detail
_priorityproperty
protected var _priority:int = 0

priorityproperty 
priority:int

Returns a default priority of 0 for this action. Derived classes override this method if they want a different default priority.


Implementation
    public function get priority():int
    public function set priority(value:int):void

See also

Constructor Detail
ActionBase()Constructor
public function ActionBase()

The constructor creates an ActionBase object. But you shouldn't use it directly because the ActionBase class is abstract.

Method Detail
addedToEmitter()method
public function addedToEmitter(emitter:Emitter):void

This method does nothing. Some derived classes override this method to perform actions when the action is added to an emitter.

Parameters

emitter:Emitter — The Emitter that the Action was added to.

See also

removedFromEmitter()method 
public function removedFromEmitter(emitter:Emitter):void

This method does nothing. Some derived classes override this method to perform actions when the action is removed from the emitter.

Parameters

emitter:Emitter — The Emitter that the Action was removed from.

See also

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

This method does nothing. All derived classes override this method to update each particle every frame.

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