Drag[en]gine Script Module DragonScript  1.23
Dragengine.Scenery.ECBehaviorActorMover Class Reference

Behavior adding mover support to actors. More...

Inheritance diagram for Dragengine.Scenery.ECBehaviorActorMover:
Dragengine.Scenery.DefaultECBehavior Dragengine.Scenery.ECBehavior Dragengine.Scenery.BehaviorCompatiblePersistency

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

Detailed Description

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.

Member Function Documentation

◆ addListenerFactory() [1/2]

void Dragengine.Scenery.ECBehaviorActorMover.addListenerFactory ( Block  blockFactory)

Add listener factory using block.

Block receives as parameter Instance and returns Listener.

◆ addListenerFactory() [2/2]

void Dragengine.Scenery.ECBehaviorActorMover.addListenerFactory ( ListenerFactory  factory)

Add listener factory.

◆ createListeners()

void Dragengine.Scenery.ECBehaviorActorMover.createListeners ( Instance  instance)

Create listeners from factories adding them to behavior instance.

◆ dispose()

void Dragengine.Scenery.ECBehaviorActorMover.dispose ( )

Dispose of behavior.

Reimplemented from Dragengine.Scenery.DefaultECBehavior.

◆ forEachListenerFactory()

void Dragengine.Scenery.ECBehaviorActorMover.forEachListenerFactory ( Block  ablock)

Visit listener factories with block with argument ListenerFactory.

◆ getBehaviorIn()

static ECBehaviorActorMover Dragengine.Scenery.ECBehaviorActorMover.getBehaviorIn ( BehaviorElementClass  eclass)
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.

◆ getConversationActor()

ECBehaviorConversationActor Dragengine.Scenery.ECBehaviorActorMover.getConversationActor ( )

Conversation actor behavior or null.

◆ getLocomotion()

ECBehaviorLocomotion Dragengine.Scenery.ECBehaviorActorMover.getLocomotion ( )

Locomotion behavior to use.

◆ getNavigator()

ECBehaviorNavigator Dragengine.Scenery.ECBehaviorActorMover.getNavigator ( )

Navigator behavior to use.

◆ getRideOn()

ECBehaviorRideOn Dragengine.Scenery.ECBehaviorActorMover.getRideOn ( )

Ride on behavior to use or null.

◆ getSpeed()

ECPFloat Dragengine.Scenery.ECBehaviorActorMover.getSpeed ( )

Movement speed.

◆ new() [1/2]

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.

◆ new() [2/2]

ECBehaviorActorMover Dragengine.Scenery.ECBehaviorActorMover.new ( BehaviorElementClass  eclass,
ECBehaviorLocomotion  locomotion,
ECBehaviorNavigator  navigator,
ECBehaviorRideOn  rideOn,
String  prefix 
)

◆ setConversationActor()

void Dragengine.Scenery.ECBehaviorActorMover.setConversationActor ( ECBehaviorConversationActor  conversationActor)

Set conversation actor or null.

If set conversation conditions and commands are added.

Member Data Documentation

◆ pConversationActor

ECBehaviorConversationActor Dragengine.Scenery.ECBehaviorActorMover.pConversationActor

◆ pListenerFactories

Array Dragengine.Scenery.ECBehaviorActorMover.pListenerFactories

◆ pLocomotion

ECBehaviorLocomotion Dragengine.Scenery.ECBehaviorActorMover.pLocomotion

◆ pNavigator

ECBehaviorNavigator Dragengine.Scenery.ECBehaviorActorMover.pNavigator

◆ pRideOn

ECBehaviorRideOn Dragengine.Scenery.ECBehaviorActorMover.pRideOn

◆ pSpeed

ECPFloat Dragengine.Scenery.ECBehaviorActorMover.pSpeed

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