Packageorg.flintparticles.common.activities
Classpublic class ActivityBase
ImplementsActivity
SubclassesFollowMouse, MoveEmitter, MoveEmitter, RotateEmitter, RotateEmitter, UpdateOnFrame

The ActivityBase class is the abstract base class for all emitter activities in the Flint library. It implements the Activity interface with a default priority of zero and empty methods for the rest of the interface.

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

Developers creating custom activities may either extend the ActivityBase class or implement the Activity interface directly. Classes that extend the ActivityBase 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.addActivity()


Public Methods
 MethodDefined by
  
The constructor creates an ActivityBase object.
ActivityBase
  
addedToEmitter(emitter:Emitter):void
This method does nothing.
ActivityBase
  
Returns a default priority of 0 for this activity.
ActivityBase
  
initialize(emitter:Emitter):void
This method does nothing.
ActivityBase
  
This method does nothing.
ActivityBase
  
update(emitter:Emitter, time:Number):void
This method does nothing.
ActivityBase
Constructor detail
ActivityBase()constructor
public function ActivityBase()

The constructor creates an ActivityBase object. But you shouldn't use it directly because the ActivityBase 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 activity is added to an emitter.

Parameters
emitter:Emitter — The Emitter that the Activity was added to.

See also

org.flintparticles.common.actions.Activity.addedToEmitter()
getDefaultPriority()method 
public function getDefaultPriority():Number

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

Returns
Number

See also

org.flintparticles.common.actions.Activity.getDefaultPriority()
initialize()method 
public function initialize(emitter:Emitter):void

This method does nothing. Derived classes override this method to alter the state of the emitter when it starts.

Parameters
emitter:Emitter — The Emitter.

See also

org.flintparticles.common.actions.Activity.initialize()
removedFromEmitter()method 
public function removedFromEmitter(emitter:Emitter):void

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

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

See also

org.flintparticles.common.actions.Activity.removedFromEmitter()
update()method 
public function update(emitter:Emitter, time:Number):void

This method does nothing. Derived classes override this method to alter the state of the emitter every frame.

Parameters
emitter:Emitter — The Emitter.
 
time:Number — The duration of the frame - used for time based updates.

See also

org.flintparticles.common.actions.Activity.update()