Drag[en]gine Script Module DragonScript
1.23
|
Behavior element behavior adding moving on rail support. More...
Classes | |
class | DefaultListener |
Default implementation of behavior instance listener. More... | |
class | Instance |
Behavior instance. More... | |
interface | Listener |
Listener for behavior instance events. More... | |
interface | ListenerFactory |
Factory creating listeners. More... | |
Public Member Functions | |
void | addListenerFactory (ListenerFactory factory) |
Add listener factory. More... | |
void | createListeners (Instance instance) |
Create listeners from factories adding them to behavior instance. More... | |
void | dispose () |
Dispose of behavior. More... | |
void | forEachListenerFactory (Block ablock) |
Visit listener factories with block with argument ListenerFactory. More... | |
ECBehaviorCollider | getCollider () |
Collider behavior. More... | |
ECComposeMoveOnRail | getMoveOnRail () |
Composeable move on rail for element class. More... | |
ECPString | getTargetMoving () |
Target move. More... | |
ECBehaviorTriggered | getTrigger () |
Trigger move. More... | |
TSTriggerTable | getTriggerTable () |
Trigger table or null if not used. More... | |
ECBehaviorMoveOnRail | new (BehaviorElementClass eclass, ECBehaviorCollider collider) |
Create behavior element class. More... | |
ECBehaviorMoveOnRail | new (BehaviorElementClass eclass, ECBehaviorCollider collider, TSTriggerTable triggerTable) |
Create behavior element class. More... | |
ECBehaviorMoveOnRail | new (BehaviorElementClass eclass, ECBehaviorCollider collider, TSTriggerTable triggerTable, String subID) |
ECBehaviorMoveOnRail | new (BehaviorElementClass eclass, ECBehaviorCollider collider, TSTriggerTable triggerTable, String subID, String prefix) |
Public Member Functions inherited from Dragengine.Scenery.DefaultECBehavior | |
void | assignInstanceIndex (int instanceIndex) |
Assign instance index. More... | |
String | getBehaviorID () |
Unique identifier of behavior. More... | |
String | getID () |
Identifier. More... | |
int | getInstanceIndex () |
Instance index. More... | |
void | loadSupportedData (String identifier, PersistencyEnvironment env, FileReader reader, ECBehaviorInstance instance) |
Load instance data of another behavior. More... | |
bool | supportsBehaviorID (String identifier) |
Behavior supports loading instance data of another behavior. More... | |
Public Member Functions inherited from Dragengine.Scenery.ECBehavior | |
ECBehaviorInstance | createInstance (BehaviorElement element) |
Create Behavior instance. More... | |
Static Public Member Functions | |
static ECBehaviorMoveOnRail | getBehaviorIn (BehaviorElementClass eclass) |
Get behavior in element class or null if absent. More... | |
Public Attributes | |
ECBehaviorCollider | pCollider |
Array | pListenerFactories |
ECComposeMoveOnRail | pMoveOnRail |
ECPString | pTargetMoving |
ECBehaviorTriggered | pTrigger |
TSTriggerTable | pTriggerTable |
Protected Member Functions | |
void | setTriggerTable (TSTriggerTable triggerTable) |
Set trigger table. More... | |
Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehavior | |
DefaultECBehavior | new (BehaviorElementClass eclass) |
Create default composeable behavior with empty identifier. More... | |
DefaultECBehavior | new (BehaviorElementClass eclass, String id) |
Create default composeable behavior. More... | |
void | setBehaviorID (String identifier) |
Set behavior identifier. More... | |
void | useClassNameAsBehaviorID () |
Set behavior identifier to "<class-name>:<identifier>". More... | |
void | useFullyQualifiedClassNameAsBehaviorID () |
Set behavior identifier to "<fully-qualified-class-name>:<identifier>". More... | |
Behavior element behavior adding moving on rail support.
Behavior element class requires the ECBehaviorCollider behavior since the collider is manipulated to move the element.
This element behavior can be present only once in a BehaviorElement. Trying to add more than one instance results in an exception thrown.
When using this behavior it is recommended to call ".getComponent().getRenderEnvMap().setValue(false)" on all ECBehaviorComponent used on the element class.
Other behaviors can add listeners to be notified if the element starts or stops moving.
If a trigger table is present the "targetMoving" object property can be set by the mapper to fire and clear a trigger target reflecting the moving state of the element.
Element class properties have the prefix "moveOnRail.".
void Dragengine.Scenery.ECBehaviorMoveOnRail.addListenerFactory | ( | ListenerFactory | factory | ) |
Add listener factory.
void Dragengine.Scenery.ECBehaviorMoveOnRail.createListeners | ( | Instance | instance | ) |
Create listeners from factories adding them to behavior instance.
void Dragengine.Scenery.ECBehaviorMoveOnRail.dispose | ( | ) |
Dispose of behavior.
Reimplemented from Dragengine.Scenery.DefaultECBehavior.
void Dragengine.Scenery.ECBehaviorMoveOnRail.forEachListenerFactory | ( | Block | ablock | ) |
Visit listener factories with block with argument ListenerFactory.
|
static |
Get behavior in element class or null if absent.
Use this method to check if a particular BehaviorElementClass contains a behavior of type ECBehaviorCollider.
ECBehaviorCollider Dragengine.Scenery.ECBehaviorMoveOnRail.getCollider | ( | ) |
Collider behavior.
ECComposeMoveOnRail Dragengine.Scenery.ECBehaviorMoveOnRail.getMoveOnRail | ( | ) |
Composeable move on rail for element class.
ECPString Dragengine.Scenery.ECBehaviorMoveOnRail.getTargetMoving | ( | ) |
Target move.
ECBehaviorTriggered Dragengine.Scenery.ECBehaviorMoveOnRail.getTrigger | ( | ) |
Trigger move.
TSTriggerTable Dragengine.Scenery.ECBehaviorMoveOnRail.getTriggerTable | ( | ) |
Trigger table or null if not used.
ECBehaviorMoveOnRail Dragengine.Scenery.ECBehaviorMoveOnRail.new | ( | BehaviorElementClass | eclass, |
ECBehaviorCollider | collider | ||
) |
Create behavior element class.
ECBehaviorMoveOnRail Dragengine.Scenery.ECBehaviorMoveOnRail.new | ( | BehaviorElementClass | eclass, |
ECBehaviorCollider | collider, | ||
TSTriggerTable | triggerTable | ||
) |
Create behavior element class.
ECBehaviorMoveOnRail Dragengine.Scenery.ECBehaviorMoveOnRail.new | ( | BehaviorElementClass | eclass, |
ECBehaviorCollider | collider, | ||
TSTriggerTable | triggerTable, | ||
String | subID | ||
) |
ECBehaviorMoveOnRail Dragengine.Scenery.ECBehaviorMoveOnRail.new | ( | BehaviorElementClass | eclass, |
ECBehaviorCollider | collider, | ||
TSTriggerTable | triggerTable, | ||
String | subID, | ||
String | prefix | ||
) |
|
protected |
Set trigger table.
ECBehaviorCollider Dragengine.Scenery.ECBehaviorMoveOnRail.pCollider |
Array Dragengine.Scenery.ECBehaviorMoveOnRail.pListenerFactories |
ECComposeMoveOnRail Dragengine.Scenery.ECBehaviorMoveOnRail.pMoveOnRail |
ECPString Dragengine.Scenery.ECBehaviorMoveOnRail.pTargetMoving |
ECBehaviorTriggered Dragengine.Scenery.ECBehaviorMoveOnRail.pTrigger |
TSTriggerTable Dragengine.Scenery.ECBehaviorMoveOnRail.pTriggerTable |