| Package | org.flintparticles.common.activities |
| Class | public class UpdateOnFrame |
| Inheritance | UpdateOnFrame ActivityBase Object |
This activity is most often used to update an action once every frame. Because the update method of an action is called once for every particle, every frame, there is no obvious point for an action to implement code that should be called once only every frame, irrespective of the number of particles. If the action implements FrameUpdatable and adds an UpdateOnFrame activity to the emitter in its addedToEmitter method, the frameUpdate method will be called once every frame.
See the Explosion Action for an example of an action that uses this activity.
See also
| Method | Defined By | ||
|---|---|---|---|
UpdateOnFrame(frameUpdatable:FrameUpdatable)
The constructor creates an UpdateOnFrame activity. | UpdateOnFrame | ||
![]() | addedToEmitter(emitter:Emitter):void
This method does nothing. | ActivityBase | |
![]() | initialize(emitter:Emitter):void
This method does nothing. | ActivityBase | |
![]() | removedFromEmitter(emitter:Emitter):void
This method does nothing. | ActivityBase | |
[override]
Calls the frameUpdate method of the FrameUpdatable object associated
with this activity. | UpdateOnFrame | ||
| UpdateOnFrame | () | Constructor |
public function UpdateOnFrame(frameUpdatable:FrameUpdatable)The constructor creates an UpdateOnFrame activity.
ParametersframeUpdatable:FrameUpdatable — The object that shouldbe updated every frame.
|
| update | () | method |
override public function update(emitter:Emitter, time:Number):voidCalls the frameUpdate method of the FrameUpdatable object associated with this activity.
This method is called by the emitter and need not be called by the user
Parameters
emitter:Emitter — The Emitter.
| |
time:Number — The duration of the frame - used for time based updates.
|
See also