Drag[en]gine Script Module DragonScript
1.21
|
Behavior instance. More...
Classes | |
class | RidableChanged |
Ridable changed. More... | |
Public Member Functions | |
void | addListener (Listener listener) |
Add listener. More... | |
void | arrivedAtGoal () |
Arrive at target. More... | |
void | calculateRemainingDistance () |
Calculate remaining distance from next path point to goal position along meters. More... | |
void | continueMoving () |
Continue moving. More... | |
void | dispose () |
Dispose of behavior instance. More... | |
void | enterFrame () |
Frame update started. More... | |
ECBehaviorConversationActor.Instance | getConversationActor () |
Conversation actor if present. More... | |
float | getDistanceToGoal () |
Remaining distance from current position to goal position along path in meters. More... | |
ECBehaviorActorMover | getECBehavior () |
Behavior. More... | |
ElementResolver | getElementResolver () |
Element resolver used during loading or null if not set. More... | |
bool | getEnableLimitTurnAngle () |
Enable limit turning angle. More... | |
float | getGoalDistance () |
Distance along path below which actor arrive at target is triggered. More... | |
DVector | getGoalPosition () |
Goal to move to or null if not set. More... | |
float | getLimitTurnAngle () |
Turning angle limit in degrees if enabled. More... | |
ECBehaviorLocomotion.Instance | getLocomotion () |
Locomotion behavior. More... | |
ECBehaviorNavigator.Instance | getNavigator () |
Navigator behavior. More... | |
int | getNextPathPoint () |
Next path point to move to or path point count if the actor is at the goal. More... | |
DVector | getNextPlaneNormal () |
Move to next path plane normal. More... | |
NavigatorPath | getPath () |
Path or null if not calculated. More... | |
bool | getPause () |
Pause moving. More... | |
ECBehaviorRidable.Instance | getRidable () |
Rideable the actor is standing upon or null. More... | |
ECBehaviorCollider.Instance | getRidableCollider () |
Rideable collider the actor is standing upon or null. More... | |
ECBehaviorRideOn.Instance | getRideOn () |
Ride on behavior if present. More... | |
float | getSpeed () |
Movement speed. More... | |
float | getWorldDistanceNextPoint () |
Distance from actor to next corner if present along normal. More... | |
DVector | getWorldNextPathPoint () |
Next path point to move to or null if the actor is at the goal. More... | |
DVector | getWorldNextPlaneNormal () |
Move to next path plane normal or null if the actor is at the goal. More... | |
bool | hasGoal () |
Goal is set and actor is moved by this mover. More... | |
bool | hasNextPathPoint () |
Has next point. More... | |
bool | hasNoGoal () |
Goal is not set and actor is not moved by this mover. More... | |
void | init (StubElement stub) |
Initialize behavior from stub. More... | |
void | moveTo (DVector goal) |
Move to goal. More... | |
void | moveTo (DVector goal, float distance) |
Move to goal. More... | |
Instance | new (ECBehaviorActorMover ecbehavior, BehaviorElement element) |
Create behavior instance. More... | |
void | onRidableChanged () |
Ridable changed. More... | |
void | pauseMoving () |
Pause moving. More... | |
void | placeOnPath (float position) |
Place actor on position relative on remaining path. More... | |
void | readFromFile (PersistencyEnvironment env, FileReader reader) |
Read behavior from file. More... | |
void | removeFromGameWorld () |
Remove element from game world. More... | |
void | removeListener (Listener listener) |
Remove listener. More... | |
void | setEnableLimitTurnAngle (bool enabled) |
Set if limit turning angle is enabled. More... | |
void | setGoalDistance (float distance) |
Set distance along path below which actor arrive at target is triggered. More... | |
void | setGoalPosition (DVector goal) |
Set goal to move to. More... | |
void | setLimitTurnAngle (float angle) |
Set turning angle limit in degrees if enabled. More... | |
void | setSpeed (float speed) |
Set movement speed. More... | |
void | think (float elapsed) |
Think about what to do for the next frame update. 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... | |
void | postThink (float elapsed) |
Post thinking after physics processing is finished. 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 | writeToFile (PersistencyEnvironment env, FileWriter writer) |
Write behavior instance to file. More... | |
Public Attributes | |
ECBehaviorConversationActor.Instance | pConversationActor |
ECBehaviorActorMover | pECBehavior |
ElementResolver | pElementResolver |
bool | pEnableLimitTurnAngle |
float | pGoalDistance |
DVector | pGoalPosition |
float | pLimitTurnAngle |
Array | pListeners |
ECBehaviorLocomotion.Instance | pLocomotion |
ECBehaviorNavigator.Instance | pNavigator |
int | pNextPathPoint |
DVector | pNextPlaneNormal |
NavigatorPath | pPath |
bool | pPause |
float | pRemainingDistance |
ECBehaviorRidable.Instance | pRidable |
ECBehaviorCollider.Instance | pRidableCollider |
ECBehaviorRideOn.Instance | pRideOn |
float | pSpeed |
Protected Member Functions | |
void | updateRequiresThinking () |
Update requires thinking. More... | |
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.
void Dragengine.Scenery.ECBehaviorActorMover.Instance.addListener | ( | Listener | listener | ) |
Add listener.
void Dragengine.Scenery.ECBehaviorActorMover.Instance.arrivedAtGoal | ( | ) |
Arrive at target.
Calls stopMoving() and arrivedAtGoal() on listeners.
void Dragengine.Scenery.ECBehaviorActorMover.Instance.calculateRemainingDistance | ( | ) |
Calculate remaining distance from next path point to goal position along meters.
void Dragengine.Scenery.ECBehaviorActorMover.Instance.continueMoving | ( | ) |
Continue moving.
void Dragengine.Scenery.ECBehaviorActorMover.Instance.dispose | ( | ) |
Dispose of behavior instance.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorActorMover.Instance.enterFrame | ( | ) |
Frame update started.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
ECBehaviorConversationActor.Instance Dragengine.Scenery.ECBehaviorActorMover.Instance.getConversationActor | ( | ) |
Conversation actor if present.
float Dragengine.Scenery.ECBehaviorActorMover.Instance.getDistanceToGoal | ( | ) |
Remaining distance from current position to goal position along path in meters.
ECBehaviorActorMover Dragengine.Scenery.ECBehaviorActorMover.Instance.getECBehavior | ( | ) |
Behavior.
ElementResolver Dragengine.Scenery.ECBehaviorActorMover.Instance.getElementResolver | ( | ) |
Element resolver used during loading or null if not set.
bool Dragengine.Scenery.ECBehaviorActorMover.Instance.getEnableLimitTurnAngle | ( | ) |
Enable limit turning angle.
float Dragengine.Scenery.ECBehaviorActorMover.Instance.getGoalDistance | ( | ) |
Distance along path below which actor arrive at target is triggered.
DVector Dragengine.Scenery.ECBehaviorActorMover.Instance.getGoalPosition | ( | ) |
Goal to move to or null if not set.
float Dragengine.Scenery.ECBehaviorActorMover.Instance.getLimitTurnAngle | ( | ) |
Turning angle limit in degrees if enabled.
ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorActorMover.Instance.getLocomotion | ( | ) |
Locomotion behavior.
ECBehaviorNavigator.Instance Dragengine.Scenery.ECBehaviorActorMover.Instance.getNavigator | ( | ) |
Navigator behavior.
int Dragengine.Scenery.ECBehaviorActorMover.Instance.getNextPathPoint | ( | ) |
Next path point to move to or path point count if the actor is at the goal.
DVector Dragengine.Scenery.ECBehaviorActorMover.Instance.getNextPlaneNormal | ( | ) |
Move to next path plane normal.
NavigatorPath Dragengine.Scenery.ECBehaviorActorMover.Instance.getPath | ( | ) |
Path or null if not calculated.
bool Dragengine.Scenery.ECBehaviorActorMover.Instance.getPause | ( | ) |
Pause moving.
ECBehaviorRidable.Instance Dragengine.Scenery.ECBehaviorActorMover.Instance.getRidable | ( | ) |
Rideable the actor is standing upon or null.
ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorActorMover.Instance.getRidableCollider | ( | ) |
Rideable collider the actor is standing upon or null.
ECBehaviorRideOn.Instance Dragengine.Scenery.ECBehaviorActorMover.Instance.getRideOn | ( | ) |
Ride on behavior if present.
float Dragengine.Scenery.ECBehaviorActorMover.Instance.getSpeed | ( | ) |
Movement speed.
float Dragengine.Scenery.ECBehaviorActorMover.Instance.getWorldDistanceNextPoint | ( | ) |
Distance from actor to next corner if present along normal.
Returns 0 if next corner or normal is not present.
DVector Dragengine.Scenery.ECBehaviorActorMover.Instance.getWorldNextPathPoint | ( | ) |
Next path point to move to or null if the actor is at the goal.
If present point is in world space (transformed by relative collider if present).
DVector Dragengine.Scenery.ECBehaviorActorMover.Instance.getWorldNextPlaneNormal | ( | ) |
Move to next path plane normal or null if the actor is at the goal.
If present normal is in world space (transformed by relative collider if present).
bool Dragengine.Scenery.ECBehaviorActorMover.Instance.hasGoal | ( | ) |
Goal is set and actor is moved by this mover.
bool Dragengine.Scenery.ECBehaviorActorMover.Instance.hasNextPathPoint | ( | ) |
Has next point.
If true is returned calls to getWorldNextPathPoint(), getWorldNextPlaneNormal() and getWorldDistanceNextPoint() will return non-null/non-0 value.
bool Dragengine.Scenery.ECBehaviorActorMover.Instance.hasNoGoal | ( | ) |
Goal is not set and actor is not moved by this mover.
void Dragengine.Scenery.ECBehaviorActorMover.Instance.init | ( | StubElement | stub | ) |
Initialize behavior from stub.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorActorMover.Instance.moveTo | ( | DVector | goal | ) |
Move to goal.
void Dragengine.Scenery.ECBehaviorActorMover.Instance.moveTo | ( | DVector | goal, |
float | distance | ||
) |
Move to goal.
Instance Dragengine.Scenery.ECBehaviorActorMover.Instance.new | ( | ECBehaviorActorMover | ecbehavior, |
BehaviorElement | element | ||
) |
Create behavior instance.
void Dragengine.Scenery.ECBehaviorActorMover.Instance.onRidableChanged | ( | ) |
Ridable changed.
Called by RidableChanged. If overwritten do not forget to super-call.
void Dragengine.Scenery.ECBehaviorActorMover.Instance.pauseMoving | ( | ) |
Pause moving.
void Dragengine.Scenery.ECBehaviorActorMover.Instance.placeOnPath | ( | float | position | ) |
Place actor on position relative on remaining path.
position | Value in range 0 (current position) to 1 (goal position) along path. |
void Dragengine.Scenery.ECBehaviorActorMover.Instance.readFromFile | ( | PersistencyEnvironment | env, |
FileReader | reader | ||
) |
Read behavior from file.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorActorMover.Instance.removeFromGameWorld | ( | ) |
Remove element from game world.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorActorMover.Instance.removeListener | ( | Listener | listener | ) |
Remove listener.
void Dragengine.Scenery.ECBehaviorActorMover.Instance.setEnableLimitTurnAngle | ( | bool | enabled | ) |
Set if limit turning angle is enabled.
void Dragengine.Scenery.ECBehaviorActorMover.Instance.setGoalDistance | ( | float | distance | ) |
Set distance along path below which actor arrive at target is triggered.
void Dragengine.Scenery.ECBehaviorActorMover.Instance.setGoalPosition | ( | DVector | goal | ) |
Set goal to move to.
void Dragengine.Scenery.ECBehaviorActorMover.Instance.setLimitTurnAngle | ( | float | angle | ) |
Set turning angle limit in degrees if enabled.
void Dragengine.Scenery.ECBehaviorActorMover.Instance.setSpeed | ( | float | speed | ) |
Set movement speed.
void Dragengine.Scenery.ECBehaviorActorMover.Instance.think | ( | float | elapsed | ) |
Think about what to do for the next frame update.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
|
protected |
Update requires thinking.
ECBehaviorConversationActor.Instance Dragengine.Scenery.ECBehaviorActorMover.Instance.pConversationActor |
ECBehaviorActorMover Dragengine.Scenery.ECBehaviorActorMover.Instance.pECBehavior |
ElementResolver Dragengine.Scenery.ECBehaviorActorMover.Instance.pElementResolver |
bool Dragengine.Scenery.ECBehaviorActorMover.Instance.pEnableLimitTurnAngle |
float Dragengine.Scenery.ECBehaviorActorMover.Instance.pGoalDistance |
DVector Dragengine.Scenery.ECBehaviorActorMover.Instance.pGoalPosition |
float Dragengine.Scenery.ECBehaviorActorMover.Instance.pLimitTurnAngle |
Array Dragengine.Scenery.ECBehaviorActorMover.Instance.pListeners |
ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorActorMover.Instance.pLocomotion |
ECBehaviorNavigator.Instance Dragengine.Scenery.ECBehaviorActorMover.Instance.pNavigator |
int Dragengine.Scenery.ECBehaviorActorMover.Instance.pNextPathPoint |
DVector Dragengine.Scenery.ECBehaviorActorMover.Instance.pNextPlaneNormal |
NavigatorPath Dragengine.Scenery.ECBehaviorActorMover.Instance.pPath |
bool Dragengine.Scenery.ECBehaviorActorMover.Instance.pPause |
float Dragengine.Scenery.ECBehaviorActorMover.Instance.pRemainingDistance |
ECBehaviorRidable.Instance Dragengine.Scenery.ECBehaviorActorMover.Instance.pRidable |
ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorActorMover.Instance.pRidableCollider |
ECBehaviorRideOn.Instance Dragengine.Scenery.ECBehaviorActorMover.Instance.pRideOn |
float Dragengine.Scenery.ECBehaviorActorMover.Instance.pSpeed |