| Package | org.flintparticles.common.activities |
| Interface | public interface Activity extends Behaviour |
| Implementors | ActivityBase |
An Activity is a class that is used to continuously modify an aspect of an emitter by updating the emitter every frame. Activities may, for example, move or rotate the emitter.
Activities are associated with emitters by using the emitter's addActivity method. Activities are removed from the emitter by using the emitter's removeActivity method.
See also
| Method | Defined By | ||
|---|---|---|---|
![]() | addedToEmitter(emitter:Emitter):void
The addedToEmitter method is called by the emitter when the Behaviour is
added to it. | Behaviour | |
initialize(emitter:Emitter):void
The initialize method is used by the emitter to start the activity. | Activity | ||
![]() | removedFromEmitter(emitter:Emitter):void
The removedFromEmitter method is called by the emitter when the Behaviour
is removed from it. | Behaviour | |
The update method is used by the emitter to apply the activity. | Activity | ||
| initialize | () | method |
public function initialize(emitter:Emitter):voidThe initialize method is used by the emitter to start the activity. It is called within the emitter's start method and need not be called by the user.
Parameters
emitter:Emitter — The Emitter that is using the activity.
|
| update | () | method |
public function update(emitter:Emitter, time:Number):voidThe update method is used by the emitter to apply the activity. It is the key feature of the activity and is used to update the state of the emitter. This method is called within the emitter's update loop and need not be called by the user.
Parameters
emitter:Emitter — The Emitter that is using the activity.
| |
time:Number — The duration of the frame (in seconds) - used for time based
updates.
|