Packageidv.cjcat.stardust.common.actions.triggers
Classpublic class ActionTrigger
InheritanceActionTrigger Inheritance CompositeAction Inheritance Action Inheritance StardustElement
SubclassesActionTrigger2D, ActionTrigger3D, DeathTrigger, LifeTrigger

ActionTrigger is a conditional composite action.

Only when the testTrigger() method returns true will the component actions' update() methods be called.



Public Properties
 PropertyDefined by
 Inheritedactive : Boolean
Denotes if the action is active, true by default.
Action
 InheritedcheckComponentMasks : Boolean
CompositeAction
  inverted : Boolean
ActionTrigger
 Inheritedmask : 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
 Inheritedname : String
StardustElement
 InheritedneedsSortedParticles : Boolean
CompositeAction
 InheritedonAdd : ISignal
Dispatched when the added to an emitter.
Action
 InheritedonPriorityChange : ISignal
Dispatched when the action's priority is changed.
Action
 InheritedonRemove : ISignal
Dispatched when the removed from an emitter.
Action
 Inheritedpriority : int
Actions will be sorted by the associated emitter according to their priorities.
Action
 InheritedskipThisAction : Boolean
Reset to false on each emitter step.
Action
 Inheritedsupports2D : Boolean
Whether this action supports 2D.
Action
 Inheritedsupports3D : Boolean
Whether this action supports 3D.
Action
Public Methods
 MethodDefined by
  
ActionTrigger(inverted:Boolean = false)
ActionTrigger
 Inherited
addAction(action:Action):void
Adds an action to the composite action.
CompositeAction
 Inherited
clearActions():void
Removes all actions from the composite action.
CompositeAction
  
ActionTrigger
 Inherited
CompositeAction
 Inherited
getXMLTag():XML
Returns the root tag of the XML representation.
StardustElement
  
getXMLTagName():String
ActionTrigger
  
parseXML(xml:XML, builder:XMLBuilder = null):void
ActionTrigger
 Inherited
postUpdate(emitter:Emitter, time:Number):void
CompositeAction
 Inherited
preUpdate(emitter:Emitter, time:Number):void
CompositeAction
 Inherited
removeAction(action:Action):void
Removes an action to the composite action.
CompositeAction
 Inherited
sortActions(action:Action = null):void
CompositeAction
  
testTrigger(emitter:Emitter, particle:Particle, time:Number):Boolean
[Abstract Method] If this method returns true, the update() methods of the component actions are called.
ActionTrigger
  
toXML():XML
ActionTrigger
  
update(emitter:Emitter, particle:Particle, time:Number):void
Used if the trigger is added to a composite action.
ActionTrigger
Property detail
invertedproperty
public var inverted:Boolean
Constructor detail
ActionTrigger()constructor
public function ActionTrigger(inverted:Boolean = false)Parameters
inverted:Boolean (default = false)
Method detail
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.

Parameters
emitter:Emitter
 
particle:Particle
 
time:Number

Returns
Boolean
toXML()method 
public override function toXML():XML

Returns
XML
update()method 
public final override function update(emitter:Emitter, particle:Particle, time:Number):void

Used if the trigger is added to a composite action.

Parameters
emitter:Emitter
 
particle:Particle
 
time:Number