| Package | idv.cjcat.stardust.common.actions.triggers |
| Class | public class ActionTrigger |
| Inheritance | ActionTrigger CompositeAction Action StardustElement |
| Subclasses | ActionTrigger2D, ActionTrigger3D, DeathTrigger, LifeTrigger |
ActionTrigger is a conditional composite action.
Only when the testTrigger() method returns true will the component actions' update() methods be called.
| Property | Defined by | ||
|---|---|---|---|
![]() | active : Boolean
Denotes if the action is active, true by default.
| Action | |
![]() | checkComponentMasks : Boolean | CompositeAction | |
| inverted : Boolean | ActionTrigger | ||
![]() | mask : int
The action will affect a particle only if it's active and the bitwise AND of the action's mask and the particle's mask is non-zero,
1 by default.
| Action | |
![]() | name : String | StardustElement | |
![]() | needsSortedParticles : Boolean | CompositeAction | |
![]() | onAdd : ISignal
Dispatched when the added to an emitter.
| Action | |
![]() | onPriorityChange : ISignal
Dispatched when the action's priority is changed.
| Action | |
![]() | onRemove : ISignal
Dispatched when the removed from an emitter.
| Action | |
![]() | priority : int
Actions will be sorted by the associated emitter according to their priorities.
| Action | |
![]() | skipThisAction : Boolean
Reset to false on each emitter step.
| Action | |
![]() | supports2D : Boolean
Whether this action supports 2D.
| Action | |
![]() | supports3D : Boolean
Whether this action supports 3D.
| Action | |
| Method | Defined by | ||
|---|---|---|---|
|
ActionTrigger(inverted:Boolean = false)
| ActionTrigger | ||
![]() |
Adds an action to the composite action.
| CompositeAction | |
![]() |
clearActions():void
Removes all actions from the composite action.
| CompositeAction | |
|
getElementTypeXMLTag():XML
| ActionTrigger | ||
![]() |
getRelatedObjects():Array
| CompositeAction | |
![]() |
getXMLTag():XML
Returns the root tag of the XML representation.
| StardustElement | |
|
getXMLTagName():String
| ActionTrigger | ||
|
parseXML(xml:XML, builder:XMLBuilder = null):void
| ActionTrigger | ||
![]() |
postUpdate(emitter:Emitter, time:Number):void
| CompositeAction | |
![]() | CompositeAction | ||
![]() |
removeAction(action:Action):void
Removes an action to the composite action.
| CompositeAction | |
![]() |
sortActions(action:Action = null):void
| CompositeAction | |
|
[Abstract Method] If this method returns true, the
update() methods of the component actions are called. | ActionTrigger | ||
|
toXML():XML
| ActionTrigger | ||
|
Used if the trigger is added to a composite action.
| ActionTrigger | ||
| inverted | property |
public var inverted:Boolean
| ActionTrigger | () | constructor |
public function ActionTrigger(inverted:Boolean = false)Parameters
inverted:Boolean (default = false) |
| getElementTypeXMLTag | () | method |
public override function getElementTypeXMLTag():XML
Returns
XML |
| getXMLTagName | () | method |
public override function getXMLTagName():String
Returns
String |
| parseXML | () | method |
public override function parseXML(xml:XML, builder:XMLBuilder = null):voidParameters
xml:XML |
|
builder:XMLBuilder (default = null) |
| testTrigger | () | method |
public function testTrigger(emitter:Emitter, particle:Particle, time:Number):Boolean
[Abstract Method] If this method returns true, the update() methods of the component actions are called.
emitter:Emitter |
|
particle:Particle |
|
time:Number |
Boolean |
| toXML | () | method |
public override function toXML():XML
Returns
XML |
| update | () | method |
public final override function update(emitter:Emitter, particle:Particle, time:Number):voidUsed if the trigger is added to a composite action.
Parametersemitter:Emitter |
|
particle:Particle |
|
time:Number |