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

Behavior instance. More...

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

Classes

class  NavSideResult
 Navigation side result. More...
 
class  StepAside
 Step aside result. More...
 

Public Member Functions

NavSideResult bestNavSide (DVector origin, DVector leftPosition, DVector rightPosition)
 Determine side to evade using navigation space. More...
 
bool canNotStepAside ()
 Check if actor can not step aside. More...
 
bool canStepAside ()
 Check if actor can step aside. More...
 
void dispose ()
 Dispose of behavior instance. More...
 
ECBehaviorActorMover.Instance getActorMover ()
 Actor mover behavior. More...
 
ECBehaviorStepAside getECBehavior ()
 Behavior. More...
 
bool getEnabled ()
 Stepping aside is enabled. More...
 
float getRadius ()
 Step aside radius. More...
 
void init (StubElement stub)
 Initialize from stub. More...
 
Instance new (ECBehaviorStepAside ecbehavior, BehaviorElement element)
 Create behavior instance. More...
 
void readFromFile (PersistencyEnvironment env, FileReader reader)
 Read behavior from file. More...
 
void setEnabled (bool enabled)
 Set if stepping aside is enabled. More...
 
void setRadius (float radius)
 Set step aside radius. More...
 
void stepAside (StepAside stepAside)
 Step aside using found left and right distances. More...
 
void stepAsideBehaviorElement (BehaviorElement element, DVector position, DVector direction, float speed)
 Step aside behavior element. More...
 
void writeToFile (PersistencyEnvironment env, FileWriter writer)
 Write behavior to file. 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 enterFrame ()
 Frame update started. 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...
 
void postThink (float elapsed)
 Post thinking after physics processing is finished. More...
 
void removeFromGameWorld ()
 Remove element from game world. 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...
 

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

◆ bestNavSide()

NavSideResult Dragengine.Scenery.ECBehaviorStepAside.Instance.bestNavSide ( DVector  origin,
DVector  leftPosition,
DVector  rightPosition 
)

Determine side to evade using navigation space.

Returns result with nearest left and right position still inside navigation space.

◆ canNotStepAside()

bool Dragengine.Scenery.ECBehaviorStepAside.Instance.canNotStepAside ( )

Check if actor can not step aside.

Returns true if behavior is disabled or actor mover has goal set.

◆ canStepAside()

bool Dragengine.Scenery.ECBehaviorStepAside.Instance.canStepAside ( )

Check if actor can step aside.

Returns true if behavior is enabled and actor mover has no goal set.

◆ dispose()

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

Dispose of behavior instance.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ getActorMover()

ECBehaviorActorMover.Instance Dragengine.Scenery.ECBehaviorStepAside.Instance.getActorMover ( )

Actor mover behavior.

◆ getECBehavior()

ECBehaviorStepAside Dragengine.Scenery.ECBehaviorStepAside.Instance.getECBehavior ( )

Behavior.

◆ getEnabled()

bool Dragengine.Scenery.ECBehaviorStepAside.Instance.getEnabled ( )

Stepping aside is enabled.

◆ getRadius()

float Dragengine.Scenery.ECBehaviorStepAside.Instance.getRadius ( )

Step aside radius.

◆ init()

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

Initialize from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ new()

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

Create behavior instance.

◆ readFromFile()

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

Read behavior from file.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ setEnabled()

void Dragengine.Scenery.ECBehaviorStepAside.Instance.setEnabled ( bool  enabled)

Set if stepping aside is enabled.

◆ setRadius()

void Dragengine.Scenery.ECBehaviorStepAside.Instance.setRadius ( float  radius)

Set step aside radius.

◆ stepAside()

void Dragengine.Scenery.ECBehaviorStepAside.Instance.stepAside ( StepAside  stepAside)

Step aside using found left and right distances.

◆ stepAsideBehaviorElement()

void Dragengine.Scenery.ECBehaviorStepAside.Instance.stepAsideBehaviorElement ( BehaviorElement  element,
DVector  position,
DVector  direction,
float  speed 
)

Step aside behavior element.

Called by ECBehaviorClearPath and other behaviors supporting ECBehaviorStepAside. If canNotStepAside() returns false does nothing. Otherwise calls stepAsideBehaviorElement for all ECBehaviorAvoidedByActor instances present in the element to determine the largest distance to step aside to the left or right.

Parameters
elementElement requesting owner to step aside.
positionPosition to use as source of calculation. Usually the element position but could be somewhere else.
directionNormalized direction the element is moving.
speedSpeed in m/s of element.

◆ writeToFile()

void Dragengine.Scenery.ECBehaviorStepAside.Instance.writeToFile ( PersistencyEnvironment  env,
FileWriter  writer 
)

Write behavior to file.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.


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