Drag[en]gine Script Module DragonScript
1.23
|
Behavior instance. More...
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... | |
Behavior instance.
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.
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.
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.
void Dragengine.Scenery.ECBehaviorStepAside.Instance.dispose | ( | ) |
Dispose of behavior instance.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
ECBehaviorActorMover.Instance Dragengine.Scenery.ECBehaviorStepAside.Instance.getActorMover | ( | ) |
Actor mover behavior.
ECBehaviorStepAside Dragengine.Scenery.ECBehaviorStepAside.Instance.getECBehavior | ( | ) |
Behavior.
bool Dragengine.Scenery.ECBehaviorStepAside.Instance.getEnabled | ( | ) |
Stepping aside is enabled.
float Dragengine.Scenery.ECBehaviorStepAside.Instance.getRadius | ( | ) |
Step aside radius.
void Dragengine.Scenery.ECBehaviorStepAside.Instance.init | ( | StubElement | stub | ) |
Initialize from stub.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
Instance Dragengine.Scenery.ECBehaviorStepAside.Instance.new | ( | ECBehaviorStepAside | ecbehavior, |
BehaviorElement | element | ||
) |
Create behavior instance.
void Dragengine.Scenery.ECBehaviorStepAside.Instance.readFromFile | ( | PersistencyEnvironment | env, |
FileReader | reader | ||
) |
Read behavior from file.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorStepAside.Instance.setEnabled | ( | bool | enabled | ) |
Set if stepping aside is enabled.
void Dragengine.Scenery.ECBehaviorStepAside.Instance.setRadius | ( | float | radius | ) |
Set step aside radius.
void Dragengine.Scenery.ECBehaviorStepAside.Instance.stepAside | ( | StepAside | stepAside | ) |
Step aside using found left and right distances.
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.
element | Element requesting owner to step aside. |
position | Position to use as source of calculation. Usually the element position but could be somewhere else. |
direction | Normalized direction the element is moving. |
speed | Speed in m/s of element. |
void Dragengine.Scenery.ECBehaviorStepAside.Instance.writeToFile | ( | PersistencyEnvironment | env, |
FileWriter | writer | ||
) |
Write behavior to file.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.