Drag[en]gine Script Module DragonScript
1.21
|
Behavior adding mover support to actors. More...
Classes | |
class | BlockListenerFactory |
Factory creating listeners using block. More... | |
class | ConvoCommand |
Conversation command. More... | |
class | ConvoCondition |
Conversation condition. More... | |
class | DefaultListener |
Default implementation of behavior instance listener. More... | |
class | Instance |
Behavior instance. More... | |
interface | Listener |
Listener for behavior instance events. More... | |
interface | ListenerFactory |
Factory creating listeners. More... | |
Public Member Functions | |
void | addListenerFactory (Block blockFactory) |
Add listener factory using block. More... | |
void | addListenerFactory (ListenerFactory factory) |
Add listener factory. More... | |
void | createListeners (Instance instance) |
Create listeners from factories adding them to behavior instance. More... | |
void | dispose () |
Dispose of behavior. More... | |
void | forEachListenerFactory (Block ablock) |
Visit listener factories with block with argument ListenerFactory. More... | |
ECBehaviorConversationActor | getConversationActor () |
Conversation actor behavior or null. More... | |
ECBehaviorLocomotion | getLocomotion () |
Locomotion behavior to use. More... | |
ECBehaviorNavigator | getNavigator () |
Navigator behavior to use. More... | |
ECBehaviorRideOn | getRideOn () |
Ride on behavior to use or null. More... | |
ECPFloat | getSpeed () |
Movement speed. More... | |
ECBehaviorActorMover | new (BehaviorElementClass eclass, ECBehaviorLocomotion locomotion, ECBehaviorNavigator navigator, ECBehaviorRideOn rideOn) |
Create behavior element class. More... | |
ECBehaviorActorMover | new (BehaviorElementClass eclass, ECBehaviorLocomotion locomotion, ECBehaviorNavigator navigator, ECBehaviorRideOn rideOn, String prefix) |
void | setConversationActor (ECBehaviorConversationActor conversationActor) |
Set conversation actor 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 ECBehaviorActorMover | getBehaviorIn (BehaviorElementClass eclass) |
Get behavior in element class or null if absent. More... | |
Public Attributes | |
ECBehaviorConversationActor | pConversationActor |
Array | pListenerFactories |
ECBehaviorLocomotion | pLocomotion |
ECBehaviorNavigator | pNavigator |
ECBehaviorRideOn | pRideOn |
ECPFloat | pSpeed |
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 mover support to actors.
Uses ECBehaviorNavigator to find a path. Uses ECBehaviorLocomotion to provide input to the actor for the direction to move to. Listener tell the actor and other behavior about the state of moving towards the goal.
Requires these behaviors the be present:
Supports these optional behaviors:
Add a listener to be notified if the actor arrives at the target. For BaseActor the class BaseActorListener can be used calling BaseActorAI.arrivedAtGoal().
If conversation actor is used see ECBehaviorActorMover.ConvoCondition and ECBehaviorActorMover.ConvoCommand for supported syntax.
void Dragengine.Scenery.ECBehaviorActorMover.addListenerFactory | ( | Block | blockFactory | ) |
void Dragengine.Scenery.ECBehaviorActorMover.addListenerFactory | ( | ListenerFactory | factory | ) |
Add listener factory.
void Dragengine.Scenery.ECBehaviorActorMover.createListeners | ( | Instance | instance | ) |
Create listeners from factories adding them to behavior instance.
void Dragengine.Scenery.ECBehaviorActorMover.dispose | ( | ) |
Dispose of behavior.
Reimplemented from Dragengine.Scenery.DefaultECBehavior.
void Dragengine.Scenery.ECBehaviorActorMover.forEachListenerFactory | ( | Block | ablock | ) |
Visit listener factories with block with argument ListenerFactory.
|
static |
Get behavior in element class or null if absent.
Use this method to check if a particular BehaviorElementClass contains a behavior of type ECBehaviorActorMover.
ECBehaviorConversationActor Dragengine.Scenery.ECBehaviorActorMover.getConversationActor | ( | ) |
Conversation actor behavior or null.
ECBehaviorLocomotion Dragengine.Scenery.ECBehaviorActorMover.getLocomotion | ( | ) |
Locomotion behavior to use.
ECBehaviorNavigator Dragengine.Scenery.ECBehaviorActorMover.getNavigator | ( | ) |
Navigator behavior to use.
ECBehaviorRideOn Dragengine.Scenery.ECBehaviorActorMover.getRideOn | ( | ) |
Ride on behavior to use or null.
ECPFloat Dragengine.Scenery.ECBehaviorActorMover.getSpeed | ( | ) |
Movement speed.
ECBehaviorActorMover Dragengine.Scenery.ECBehaviorActorMover.new | ( | BehaviorElementClass | eclass, |
ECBehaviorLocomotion | locomotion, | ||
ECBehaviorNavigator | navigator, | ||
ECBehaviorRideOn | rideOn | ||
) |
Create behavior element class.
These values are optional and can be null: rideOn.
ECBehaviorActorMover Dragengine.Scenery.ECBehaviorActorMover.new | ( | BehaviorElementClass | eclass, |
ECBehaviorLocomotion | locomotion, | ||
ECBehaviorNavigator | navigator, | ||
ECBehaviorRideOn | rideOn, | ||
String | prefix | ||
) |
void Dragengine.Scenery.ECBehaviorActorMover.setConversationActor | ( | ECBehaviorConversationActor | conversationActor | ) |
Set conversation actor or null.
If set conversation conditions and commands are added.
ECBehaviorConversationActor Dragengine.Scenery.ECBehaviorActorMover.pConversationActor |
Array Dragengine.Scenery.ECBehaviorActorMover.pListenerFactories |
ECBehaviorLocomotion Dragengine.Scenery.ECBehaviorActorMover.pLocomotion |
ECBehaviorNavigator Dragengine.Scenery.ECBehaviorActorMover.pNavigator |
ECBehaviorRideOn Dragengine.Scenery.ECBehaviorActorMover.pRideOn |
ECPFloat Dragengine.Scenery.ECBehaviorActorMover.pSpeed |