Drag[en]gine Script Module DragonScript  1.23
Dragengine.Scenery.ECBehaviorMoveOnRail Class Reference

Behavior element behavior adding moving on rail support. More...

Inheritance diagram for Dragengine.Scenery.ECBehaviorMoveOnRail:
Dragengine.Scenery.DefaultECBehavior Dragengine.Scenery.ECBehavior Dragengine.Scenery.BehaviorCompatiblePersistency

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...
 

Detailed Description

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.".

Member Function Documentation

◆ addListenerFactory()

void Dragengine.Scenery.ECBehaviorMoveOnRail.addListenerFactory ( ListenerFactory  factory)

Add listener factory.

◆ createListeners()

void Dragengine.Scenery.ECBehaviorMoveOnRail.createListeners ( Instance  instance)

Create listeners from factories adding them to behavior instance.

◆ dispose()

void Dragengine.Scenery.ECBehaviorMoveOnRail.dispose ( )

Dispose of behavior.

Reimplemented from Dragengine.Scenery.DefaultECBehavior.

◆ forEachListenerFactory()

void Dragengine.Scenery.ECBehaviorMoveOnRail.forEachListenerFactory ( Block  ablock)

Visit listener factories with block with argument ListenerFactory.

◆ getBehaviorIn()

static ECBehaviorMoveOnRail Dragengine.Scenery.ECBehaviorMoveOnRail.getBehaviorIn ( BehaviorElementClass  eclass)
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.

◆ getCollider()

ECBehaviorCollider Dragengine.Scenery.ECBehaviorMoveOnRail.getCollider ( )

Collider behavior.

◆ getMoveOnRail()

ECComposeMoveOnRail Dragengine.Scenery.ECBehaviorMoveOnRail.getMoveOnRail ( )

Composeable move on rail for element class.

◆ getTargetMoving()

ECPString Dragengine.Scenery.ECBehaviorMoveOnRail.getTargetMoving ( )

Target move.

◆ getTrigger()

ECBehaviorTriggered Dragengine.Scenery.ECBehaviorMoveOnRail.getTrigger ( )

Trigger move.

◆ getTriggerTable()

TSTriggerTable Dragengine.Scenery.ECBehaviorMoveOnRail.getTriggerTable ( )

Trigger table or null if not used.

◆ new() [1/4]

ECBehaviorMoveOnRail Dragengine.Scenery.ECBehaviorMoveOnRail.new ( BehaviorElementClass  eclass,
ECBehaviorCollider  collider 
)

Create behavior element class.

◆ new() [2/4]

ECBehaviorMoveOnRail Dragengine.Scenery.ECBehaviorMoveOnRail.new ( BehaviorElementClass  eclass,
ECBehaviorCollider  collider,
TSTriggerTable  triggerTable 
)

Create behavior element class.

◆ new() [3/4]

ECBehaviorMoveOnRail Dragengine.Scenery.ECBehaviorMoveOnRail.new ( BehaviorElementClass  eclass,
ECBehaviorCollider  collider,
TSTriggerTable  triggerTable,
String  subID 
)

◆ new() [4/4]

ECBehaviorMoveOnRail Dragengine.Scenery.ECBehaviorMoveOnRail.new ( BehaviorElementClass  eclass,
ECBehaviorCollider  collider,
TSTriggerTable  triggerTable,
String  subID,
String  prefix 
)

◆ setTriggerTable()

void Dragengine.Scenery.ECBehaviorMoveOnRail.setTriggerTable ( TSTriggerTable  triggerTable)
protected

Set trigger table.

Member Data Documentation

◆ pCollider

ECBehaviorCollider Dragengine.Scenery.ECBehaviorMoveOnRail.pCollider

◆ pListenerFactories

Array Dragengine.Scenery.ECBehaviorMoveOnRail.pListenerFactories

◆ pMoveOnRail

ECComposeMoveOnRail Dragengine.Scenery.ECBehaviorMoveOnRail.pMoveOnRail

◆ pTargetMoving

ECPString Dragengine.Scenery.ECBehaviorMoveOnRail.pTargetMoving

◆ pTrigger

ECBehaviorTriggered Dragengine.Scenery.ECBehaviorMoveOnRail.pTrigger

◆ pTriggerTable

TSTriggerTable Dragengine.Scenery.ECBehaviorMoveOnRail.pTriggerTable

The documentation for this class was generated from the following file: