Drag[en]gine Script Module DragonScript  1.21
Dragengine.Scenery.ECBehaviorRideOn.Instance Class Reference

Behavior instance. More...

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

Classes

class  NoMoreTouchingGround
 Clear ridable and apply ridable velocity if no more touching ground. More...
 
class  UpdateLocomotionListener
 Update locomotion on collider changed. More...
 

Public Member Functions

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

Public Attributes

ECBehaviorRideOn pECBehavior
 
ElementResolver pElementResolver
 
Array pListeners
 
bool pLocked
 
ECBehaviorLocomotion.Instance pLocomotion
 
ECBehaviorProjectToGround.Instance pProjectToGround
 
ECBehaviorRidable.Instance pRidable
 

Additional Inherited Members

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

Detailed Description

Behavior instance.

Member Function Documentation

◆ addListener()

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

Add listener.

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

◆ enterFrame()

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

Frame update started.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ getECBehavior()

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

Behavior.

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

◆ getLocomotion()

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

Locomotion behavior instance.

◆ getProjectToGround()

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

Project to ground behavior instance.

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

◆ isNotRiding()

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

Actor is not riding.

◆ new()

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

Create behavior instance.

◆ onNoMoreTouchingGround()

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

Actor is no more touching ground.

If not locked calls setRidable(null).

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

◆ readFromFile()

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

Read behavior from file.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ removeFromGameWorld()

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

Remove from game world.

Calls setRidable(null).

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ removeListener()

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

Remove listener.

◆ setLocked()

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

Set if ridable is locked.

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

◆ updateLocomotion()

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

Update locomotion orientation from ridable if present.

Member Data Documentation

◆ pECBehavior

ECBehaviorRideOn Dragengine.Scenery.ECBehaviorRideOn.Instance.pECBehavior

◆ pElementResolver

ElementResolver Dragengine.Scenery.ECBehaviorRideOn.Instance.pElementResolver

◆ pListeners

Array Dragengine.Scenery.ECBehaviorRideOn.Instance.pListeners

◆ pLocked

bool Dragengine.Scenery.ECBehaviorRideOn.Instance.pLocked

◆ pLocomotion

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

◆ pProjectToGround

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

◆ pRidable

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

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