Drag[en]gine Script Module DragonScript
1.23
|
Behavior adding support to actors to avoid collisions with ECBehaviorAvoidedByActor. More...
Classes | |
class | Instance |
Behavior instance. More... | |
Public Member Functions | |
void | dispose () |
Dispose of behavior. More... | |
ECBehaviorActorMover | getActorMover () |
Actor mover behavior. More... | |
ECBehaviorBehaviorTree | getBehaviorTree () |
Behavior tree behavior or null. More... | |
ECComposeCollisionFilter | getCollisionFilter () |
Collision filter. More... | |
ECPFloat | getRadius () |
Avoid radius. More... | |
ECBehaviorRideOn | getRideOn () |
RideOn behavior or null. More... | |
Instance | instance (BehaviorElement element) |
Get instance in element from owner element class. More... | |
ECBehaviorAvoidCollision | new (BehaviorElementClass eclass, ECBehaviorActorMover actorMover, ECBehaviorRideOn rideOn) |
Create behavior element class. More... | |
ECBehaviorAvoidCollision | new (BehaviorElementClass eclass, ECBehaviorActorMover actorMover, ECBehaviorRideOn rideOn, String prefix) |
void | setBehaviorTree (ECBehaviorBehaviorTree behavior) |
Set behavior tree behavior or null. More... | |
Public Member Functions inherited from Dragengine.Scenery.DefaultECBehavior | |
void | assignInstanceIndex (int instanceIndex) |
Assign instance index. More... | |
String | getBehaviorID () |
Unique identifier of behavior. More... | |
String | getID () |
Identifier. More... | |
int | getInstanceIndex () |
Instance index. More... | |
void | loadSupportedData (String identifier, PersistencyEnvironment env, FileReader reader, ECBehaviorInstance instance) |
Load instance data of another behavior. More... | |
bool | supportsBehaviorID (String identifier) |
Behavior supports loading instance data of another behavior. More... | |
Public Member Functions inherited from Dragengine.Scenery.ECBehavior | |
ECBehaviorInstance | createInstance (BehaviorElement element) |
Create Behavior instance. More... | |
Static Public Member Functions | |
static ECBehaviorAvoidCollision | getBehaviorIn (BehaviorElementClass eclass) |
Get behavior in element class or null if absent. More... | |
Public Attributes | |
ECBehaviorActorMover | pActorMover |
ECBehaviorBehaviorTree | pBehaviorTree |
ECComposeCollisionFilter | pCollisionFilter |
ECPFloat | pRadius |
ECBehaviorRideOn | pRideOn |
Additional Inherited Members | |
Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehavior | |
DefaultECBehavior | new (BehaviorElementClass eclass) |
Create default composeable behavior with empty identifier. More... | |
DefaultECBehavior | new (BehaviorElementClass eclass, String id) |
Create default composeable behavior. More... | |
void | setBehaviorID (String identifier) |
Set behavior identifier. More... | |
void | useClassNameAsBehaviorID () |
Set behavior identifier to "<class-name>:<identifier>". More... | |
void | useFullyQualifiedClassNameAsBehaviorID () |
Set behavior identifier to "<fully-qualified-class-name>:<identifier>". More... | |
Behavior adding support to actors to avoid collisions with ECBehaviorAvoidedByActor.
Behavior attaches to ECBehaviorActorMover to modify walking path while moving.
To use this behavior add it to the element class and make sure to call setShapesSphere() to set up the collision test shapes. The best time to do this is either in BehaviorElement.init() or inside BaseActorAction if you need to change them per action.
Requires these behaviors to be present:
Uses these behaviors if present.
The following behavior tree actions are added if an ECBehaviorBehaviorTree is presen:
Set behavior parameters. Supports these optional action parameters:
This is an example of using this action:
void Dragengine.Scenery.ECBehaviorAvoidCollision.dispose | ( | ) |
Dispose of behavior.
Reimplemented from Dragengine.Scenery.DefaultECBehavior.
ECBehaviorActorMover Dragengine.Scenery.ECBehaviorAvoidCollision.getActorMover | ( | ) |
Actor mover behavior.
|
static |
Get behavior in element class or null if absent.
Use this method to check if a particular BehaviorElementClass contains a behavior of type ECBehaviorAvoidCollision.
ECBehaviorBehaviorTree Dragengine.Scenery.ECBehaviorAvoidCollision.getBehaviorTree | ( | ) |
Behavior tree behavior or null.
ECComposeCollisionFilter Dragengine.Scenery.ECBehaviorAvoidCollision.getCollisionFilter | ( | ) |
Collision filter.
ECPFloat Dragengine.Scenery.ECBehaviorAvoidCollision.getRadius | ( | ) |
Avoid radius.
ECBehaviorRideOn Dragengine.Scenery.ECBehaviorAvoidCollision.getRideOn | ( | ) |
RideOn behavior or null.
Instance Dragengine.Scenery.ECBehaviorAvoidCollision.instance | ( | BehaviorElement | element | ) |
Get instance in element from owner element class.
ECBehaviorAvoidCollision Dragengine.Scenery.ECBehaviorAvoidCollision.new | ( | BehaviorElementClass | eclass, |
ECBehaviorActorMover | actorMover, | ||
ECBehaviorRideOn | rideOn | ||
) |
Create behavior element class.
These values are optional and can be null: rideOn.
ECBehaviorAvoidCollision Dragengine.Scenery.ECBehaviorAvoidCollision.new | ( | BehaviorElementClass | eclass, |
ECBehaviorActorMover | actorMover, | ||
ECBehaviorRideOn | rideOn, | ||
String | prefix | ||
) |
void Dragengine.Scenery.ECBehaviorAvoidCollision.setBehaviorTree | ( | ECBehaviorBehaviorTree | behavior | ) |
Set behavior tree behavior or null.
ECBehaviorActorMover Dragengine.Scenery.ECBehaviorAvoidCollision.pActorMover |
ECBehaviorBehaviorTree Dragengine.Scenery.ECBehaviorAvoidCollision.pBehaviorTree |
ECComposeCollisionFilter Dragengine.Scenery.ECBehaviorAvoidCollision.pCollisionFilter |
ECPFloat Dragengine.Scenery.ECBehaviorAvoidCollision.pRadius |
ECBehaviorRideOn Dragengine.Scenery.ECBehaviorAvoidCollision.pRideOn |