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

Behavior instance. More...

Inheritance diagram for Dragengine.Scenery.ECBehaviorBehaviorTree.Instance:
Dragengine.Scenery.DefaultECBehaviorInstance Dragengine.Scenery.ECBehaviorInstance

Public Member Functions

void addListener (Listener listener)
 Add listener. More...
 
void dispose ()
 Dispose of composeable instance. More...
 
BehaviorTree getBehaviorTree ()
 Behavior tree. More...
 
BTContext getContext ()
 Context. More...
 
ECBehaviorBehaviorTree getECBehavior ()
 Behavior. More...
 
bool getFailed ()
 Behavior tree failed and will not run again. More...
 
bool getRun ()
 Run behavior tree on element thinking. More...
 
void init (StubElement stub)
 Initialize element from stub. More...
 
Instance new (ECBehaviorBehaviorTree ecbehavior, BehaviorElement element)
 Create element. More...
 
void notifyRestarted (BTContext context)
 Notify listeners behavior tree restarted. More...
 
void removeListener (Listener listener)
 Remove listener. More...
 
void setAction (String name, Block actionBlock)
 Set action to behavior tree using block. More...
 
void setAction (String name, BTAction action)
 Set action to behavior tree. More...
 
void setCondition (String name, Block conditionBlock)
 Set condition to behavior tree using block. More...
 
void setCondition (String name, BTCondition condition)
 Set condition to behavior tree. More...
 
void think (float elapsed)
 Think about what the element is going to do in this frame. More...
 
void writeToFile (PersistencyEnvironment env, FileWriter writer)
 Write element 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 readFromFile (PersistencyEnvironment env, FileReader reader)
 Read behavior instance from file. 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...
 

Public Attributes

BehaviorTree pBehaviorTree
 
BTContext pContext
 
ECBehaviorBehaviorTree pECBehavior
 
bool pFailed
 
Array pListeners
 
bool pRun
 

Protected Member Functions

BTContext createContext (StubElement stub, BehaviorTree behaviorTree)
 Create context. More...
 
BehaviorTree loadBehaviorTree (StubElement stub)
 Load behavior tree. More...
 
void restartContext ()
 Restart behavior tree to run it again. 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...
 

Detailed Description

Behavior instance.

Member Function Documentation

◆ addListener()

void Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.addListener ( Listener  listener)

Add listener.

Version
1.19

◆ createContext()

BTContext Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.createContext ( StubElement  stub,
BehaviorTree  behaviorTree 
)
protected

Create context.

◆ dispose()

void Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.dispose ( )

Dispose of composeable instance.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ getBehaviorTree()

BehaviorTree Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.getBehaviorTree ( )

Behavior tree.

◆ getContext()

BTContext Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.getContext ( )

Context.

◆ getECBehavior()

ECBehaviorBehaviorTree Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.getECBehavior ( )

Behavior.

◆ getFailed()

bool Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.getFailed ( )

Behavior tree failed and will not run again.

◆ getRun()

bool Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.getRun ( )

Run behavior tree on element thinking.

◆ init()

void Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.init ( StubElement  stub)

Initialize element from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ loadBehaviorTree()

BehaviorTree Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.loadBehaviorTree ( StubElement  stub)
protected

Load behavior tree.

◆ new()

Instance Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.new ( ECBehaviorBehaviorTree  ecbehavior,
BehaviorElement  element 
)

Create element.

◆ notifyRestarted()

void Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.notifyRestarted ( BTContext  context)

Notify listeners behavior tree restarted.

Version
1.19

◆ removeListener()

void Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.removeListener ( Listener  listener)

Remove listener.

Version
1.19

◆ restartContext()

void Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.restartContext ( )
protected

Restart behavior tree to run it again.

◆ setAction() [1/2]

void Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.setAction ( String  name,
Block  actionBlock 
)

Set action to behavior tree using block.

Block receives arguments BTContext context and Dictionary parameters.

◆ setAction() [2/2]

void Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.setAction ( String  name,
BTAction  action 
)

Set action to behavior tree.

◆ setCondition() [1/2]

void Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.setCondition ( String  name,
Block  conditionBlock 
)

Set condition to behavior tree using block.

Block receives arguments BTContext context and Dictionary parameters and returns bool.

◆ setCondition() [2/2]

void Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.setCondition ( String  name,
BTCondition  condition 
)

Set condition to behavior tree.

◆ think()

void Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.think ( float  elapsed)

Think about what the element is going to do in this frame.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ writeToFile()

void Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.writeToFile ( PersistencyEnvironment  env,
FileWriter  writer 
)

Write element to file.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

Member Data Documentation

◆ pBehaviorTree

BehaviorTree Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.pBehaviorTree

◆ pContext

BTContext Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.pContext

◆ pECBehavior

ECBehaviorBehaviorTree Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.pECBehavior

◆ pFailed

bool Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.pFailed

◆ pListeners

Array Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.pListeners

◆ pRun

bool Dragengine.Scenery.ECBehaviorBehaviorTree.Instance.pRun

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