Package | cv.orion.output |
Class | public class FunctionOutput |
Implements | IOutput |
To use the FunctionOutput class you must first create a function to be used
as a callback. In the following example, that is pulse
.
import cv.Orion; import cv.orion.output.FunctionOutput; // First method var e:Orion = new Orion(linkageClass, new FunctionOutput(pulse)); // Second method var e2:Orion = new Orion(linkageClass); e2.output = new FunctionOutput(pulse); function pulse(startTime:uint, currentTime:uint):Boolean { var modT:uint = (currentTime - startTime) % 1000; if(modT < 500) return true; return false; }
Property | Defined by | ||
---|---|---|---|
callback : Function
Gets or sets the function used to control the output.
| FunctionOutput | ||
paused : Boolean
Gets or sets the paused property
| FunctionOutput |
Method | Defined by | ||
---|---|---|---|
FunctionOutput(callback:Function)
Controls how and when the particles are emitted via the callback function.
| FunctionOutput | ||
pause():void
Pauses the output class.
| FunctionOutput | ||
play():void
Resumes or plays the output class.
| FunctionOutput | ||
This is called everytime the particles are called to update and be redrawn.
| FunctionOutput |
callback | property |
callback:Function
[read-write]Gets or sets the function used to control the output.
Implementation public function get callback():Function
public function set callback(value:Function):void
paused | property |
paused:Boolean
[read-write]Gets or sets the paused property
Implementation public function get paused():Boolean
public function set paused(value:Boolean):void
FunctionOutput | () | constructor |
public function FunctionOutput(callback:Function)
Controls how and when the particles are emitted via the callback function.
Parameterscallback:Function — The function used to determine when to emit particles.
|
pause | () | method |
public function pause():void
Pauses the output class.
play | () | method |
public function play():void
Resumes or plays the output class.
update | () | method |
public function update(emitter:Orion):void
This is called everytime the particles are called to update and be redrawn. Depending on the output class, this can determine the output of the particles.
Parametersemitter:Orion — The emitter to be used.
|