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

Public Attributes

ECBehaviorActorMover.Instance pActorMover
ECComposeBTSM.Instance pBTSMs
ECBehaviorStepAside pECBehavior
bool pEnabled
float pRadius
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

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

References getActorMover(), Dragengine.Scenery.ECBehaviorStepAside.instance(), pActorMover, and pEnabled.

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

References pActorMover, and pECBehavior.

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

Referenced by readFromFile(), and writeToFile().

◆ getActorMover()

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

Actor mover behavior.

Referenced by bestNavSide().

◆ getECBehavior()

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

Behavior.

◆ getEnabled()

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

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

Referenced by setEnabled(), and stepAside().

◆ readFromFile()

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

Read behavior from file.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

References dispose(), and pActorMover.

◆ setEnabled()

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

Set if stepping aside is enabled.

References new().

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

References new(), pECBehavior, and pRadius.

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

References pBTSMs, pEnabled, and pRadius.

◆ writeToFile()

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

Write behavior to file.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

References dispose(), and pBTSMs.

Member Data Documentation

◆ pActorMover

ECBehaviorActorMover.Instance Dragengine.Scenery.ECBehaviorStepAside.Instance.pActorMover

◆ pBTSMs

ECComposeBTSM.Instance Dragengine.Scenery.ECBehaviorStepAside.Instance.pBTSMs

◆ pECBehavior

ECBehaviorStepAside Dragengine.Scenery.ECBehaviorStepAside.Instance.pECBehavior

Referenced by canNotStepAside(), and stepAside().

◆ pEnabled

bool Dragengine.Scenery.ECBehaviorStepAside.Instance.pEnabled

◆ pRadius

float Dragengine.Scenery.ECBehaviorStepAside.Instance.pRadius

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