Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Scenery.ECBehaviorRideOn.Instance Class Reference

Behavior instance. More...

Inheritance diagram for Dragengine.Scenery.ECBehaviorRideOn.Instance:
Dragengine.Scenery.DefaultECBehaviorInstance Dragengine.Scenery.ECBehaviorInstance

Public Member Functions

void addListener (Listener listener)
 Add listener.
void clearRidable ()
 Set ridable to null.
void dispose ()
 Dispose of behavior instance.
void enterFrame ()
 Frame update started.
ECBehaviorRideOn getECBehavior ()
 Behavior.
Vector getLinearVelocity ()
 Linear velocity of ridable or zero vector if absent.
bool getLocked ()
 Lock ridable.
ECBehaviorLocomotion.Instance getLocomotion ()
 Locomotion behavior instance.
ECBehaviorProjectToGround.Instance getProjectToGround ()
 Project to ground behavior instance.
ECBehaviorRidable.Instance getRidable ()
 Ridable the actor is riding on or null.
void init (StubElement stub)
 Initialize element from stub.
bool isNotRiding ()
 Actor is not riding.
Instance new (ECBehaviorRideOn ecbehavior, BehaviorElement element)
 Create behavior instance.
void onNoMoreTouchingGround ()
 Actor is no more touching ground.
void postThink (float elapsed)
 Post think about what to do for the next frame update.
void readFromFile (PersistencyEnvironment env, FileReader reader)
 Read behavior from file.
void removeFromGameWorld ()
 Remove from game world.
void removeListener (Listener listener)
 Remove listener.
void setLocked (bool locked)
 Set if ridable is locked.
void setRidable (ECBehaviorRidable.Instance ridable)
 Set ridable the actor is riding on or null.
void updateLocomotion ()
 Update locomotion orientation from ridable if present.
Public Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance
void addToGameWorld ()
 Add element to game world.
void attachToParent (Element parent)
 Attach element to object set by the mapper in the IGDE World Editor.
void geometryChanged ()
 Position or orientation changed.
BehaviorElement getElement ()
 Behavior element to apply behavior to.
int getInstanceIndex ()
 Behavior instance index.
DefaultECBehaviorInstance new (BehaviorElement element)
 Create default composeable instance.
bool requiresEnterFrame ()
 Behavior instance requires enterFrame() to be called.
bool requiresThink ()
 Behavior instance requires think() to be called.
void stateChanged ()
 State changed (visble, touchable).
void think (float elapsed)
 Think about what to do for the next frame update.
void writeToFile (PersistencyEnvironment env, FileWriter writer)
 Write behavior instance to file.

Public Attributes

ECComposeBTSM.Instance pBTSMs
ECBehaviorRideOn pECBehavior
ElementResolver pElementResolver
Array pListeners
bool pLocked
ECBehaviorLocomotion.Instance pLocomotion
ECBehaviorProjectToGround.Instance pProjectToGround
ECBehaviorRidable.Instance pRidable
Public Attributes inherited from Dragengine.Scenery.DefaultECBehaviorInstance
BehaviorElement pElement
int pInstanceIndex
bool pRequiresEnterFrame
bool pRequiresThink

Additional Inherited Members

Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance
void setRequiresEnterFrame (bool required)
 Set if behavior instance requires enterFrame() to be called.
void setRequiresThink (bool required)
 Set if behavior instance requires think() to be called.

Detailed Description

Behavior instance.

Member Function Documentation

◆ addListener()

void Dragengine.Scenery.ECBehaviorRideOn.Instance.addListener ( Listener listener)

Add listener.

References new(), and pECBehavior.

Referenced by removeFromGameWorld().

◆ clearRidable()

void Dragengine.Scenery.ECBehaviorRideOn.Instance.clearRidable ( )

Set ridable to null.

Same as calling setRidable(null).

◆ dispose()

void Dragengine.Scenery.ECBehaviorRideOn.Instance.dispose ( )

Dispose of behavior instance.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

Referenced by enterFrame(), and removeListener().

◆ enterFrame()

void Dragengine.Scenery.ECBehaviorRideOn.Instance.enterFrame ( )

Frame update started.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

References dispose(), and pBTSMs.

◆ getECBehavior()

ECBehaviorRideOn Dragengine.Scenery.ECBehaviorRideOn.Instance.getECBehavior ( )

Behavior.

References new().

◆ getLinearVelocity()

Vector Dragengine.Scenery.ECBehaviorRideOn.Instance.getLinearVelocity ( )

Linear velocity of ridable or zero vector if absent.

◆ getLocked()

bool Dragengine.Scenery.ECBehaviorRideOn.Instance.getLocked ( )

Lock ridable.

References new().

◆ getLocomotion()

ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.getLocomotion ( )

Locomotion behavior instance.

Referenced by removeListener().

◆ getProjectToGround()

ECBehaviorProjectToGround.Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.getProjectToGround ( )

Project to ground behavior instance.

Referenced by removeListener().

◆ getRidable()

ECBehaviorRidable.Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.getRidable ( )

Ridable the actor is riding on or null.

◆ init()

void Dragengine.Scenery.ECBehaviorRideOn.Instance.init ( StubElement stub)

Initialize element from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

Referenced by removeFromGameWorld().

◆ isNotRiding()

bool Dragengine.Scenery.ECBehaviorRideOn.Instance.isNotRiding ( )

Actor is not riding.

References updateLocomotion().

◆ new()

Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.new ( ECBehaviorRideOn ecbehavior,
BehaviorElement element )

Create behavior instance.

Referenced by addListener(), getECBehavior(), getLocked(), readFromFile(), removeListener(), and setRidable().

◆ onNoMoreTouchingGround()

void Dragengine.Scenery.ECBehaviorRideOn.Instance.onNoMoreTouchingGround ( )

Actor is no more touching ground.

If not locked calls setRidable(null).

References pBTSMs, and pListeners.

Referenced by setLocked().

◆ postThink()

void Dragengine.Scenery.ECBehaviorRideOn.Instance.postThink ( float elapsed)

Post think about what to do for the next frame update.

If locked does nothing. Otherwise if actor is grounded and element underneath is a behavior element set it as ridable otherwise clear it. If ridable is cleared applies ridable velocities to owner element.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

References pElementResolver, pListeners, pLocomotion, pProjectToGround, and pRidable.

◆ readFromFile()

void Dragengine.Scenery.ECBehaviorRideOn.Instance.readFromFile ( PersistencyEnvironment env,
FileReader reader )

◆ removeFromGameWorld()

void Dragengine.Scenery.ECBehaviorRideOn.Instance.removeFromGameWorld ( )

◆ removeListener()

void Dragengine.Scenery.ECBehaviorRideOn.Instance.removeListener ( Listener listener)

◆ setLocked()

void Dragengine.Scenery.ECBehaviorRideOn.Instance.setLocked ( bool locked)

Set if ridable is locked.

References onNoMoreTouchingGround().

◆ setRidable()

void Dragengine.Scenery.ECBehaviorRideOn.Instance.setRidable ( ECBehaviorRidable.Instance ridable)

Set ridable the actor is riding on or null.

If actor changes from riding to not riding applies the linear velocity of the ridable before clearing the ridable. This ensures an actor keeps moving into the direction the ridable has been moving if the actor for example jumps or the ridable vanishes.

References new().

◆ updateLocomotion()

void Dragengine.Scenery.ECBehaviorRideOn.Instance.updateLocomotion ( )

Update locomotion orientation from ridable if present.

References pECBehavior, pElementResolver, pLocked, pLocomotion, pProjectToGround, and pRidable.

Referenced by isNotRiding().

Member Data Documentation

◆ pBTSMs

ECComposeBTSM.Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.pBTSMs

◆ pECBehavior

ECBehaviorRideOn Dragengine.Scenery.ECBehaviorRideOn.Instance.pECBehavior

◆ pElementResolver

ElementResolver Dragengine.Scenery.ECBehaviorRideOn.Instance.pElementResolver

Referenced by postThink(), and updateLocomotion().

◆ pListeners

Array Dragengine.Scenery.ECBehaviorRideOn.Instance.pListeners

◆ pLocked

bool Dragengine.Scenery.ECBehaviorRideOn.Instance.pLocked

Referenced by removeListener(), and updateLocomotion().

◆ pLocomotion

ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.pLocomotion

◆ pProjectToGround

ECBehaviorProjectToGround.Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.pProjectToGround

◆ pRidable

ECBehaviorRidable.Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.pRidable

Referenced by postThink(), and updateLocomotion().


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