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

Behavior tree context with link to BAAIBehaviorTree. More...

Inheritance diagram for Dragengine.Scenery.BAAIBehaviorTree.BTContextAI:
Dragengine.BehaviorTreeSystem.BTContext

Public Member Functions

BehaviorElement getActor ()
 Actor. More...
 
BAAIBehaviorTree getAI ()
 AI. More...
 
BTContextAI new (BAAIBehaviorTree ai, BehaviorTree behaviorTree)
 Create context. More...
 
BTContextAI new (BAAIBehaviorTree ai, BTContext context)
 Create copy of context. More...
 
BTContextAI new (BAAIBehaviorTree ai, BTContext context, BehaviorTree behaviorTree)
 Create copy of context using different behavior tree. More...
 
BTContextAI new (BTContextAI context)
 Create copy of context. More...
 
- Public Member Functions inherited from Dragengine.BehaviorTreeSystem.BTContext
void forEachAction (Block ablock)
 Visit actions using block with parameters String (name and BTAction (action). More...
 
void forEachCondition (Block ablock)
 Visit conditions using block with parameters String (name and BTCondition (condition). More...
 
BTAction getAction (String name)
 Action for name or null if absent. More...
 
int getActionCount ()
 Number of actions. More...
 
bool getActionFirstRun ()
 Action runs for the first time after the current rule changed. More...
 
BehaviorTree getBehaviorTree ()
 Behavior tree. More...
 
BTCondition getCondition (String name)
 Condition for name or null if absent. More...
 
int getConditionCount ()
 Number of conditions. More...
 
Console getConsole ()
 Console or null if not wishing to log anything. More...
 
BTRule getCurrentRule ()
 Current rule. More...
 
BTResult getLastResult ()
 Last result. More...
 
String getLoggingName ()
 Logging name to tell apart logs. More...
 
bool getLogRuleChanges ()
 Log behavior tree rule changes. More...
 
bool getLogSteps ()
 Log behavior tree steps. More...
 
int getRunAwayLimit ()
 Run away limit. More...
 
bool hasAction (String name)
 Action is present. More...
 
bool hasCondition (String name)
 Condition is present. More...
 
BTContext new (BehaviorTree behaviorTree)
 Create behavior tree context. More...
 
BTContext new (BTContext context)
 Create copy of behavior tree context. More...
 
BTContext new (BTContext context, BehaviorTree behaviorTree)
 Create copy of behavior tree context but using a different behavior tree. More...
 
void readFromFile (PersistencyEnvironment env, FileReader reader)
 Read state from file. More...
 
void removeAction (String name)
 Remove action. More...
 
void removeAllActions ()
 Remove all actions. More...
 
void removeAllConditions ()
 Remove all conditions. More...
 
void removeCondition (String name)
 Remove condition. More...
 
void reset ()
 Reset to initial state. More...
 
void setAction (String name, Block action)
 Set action for name using block. More...
 
void setAction (String name, BTAction action)
 Set action for name. More...
 
void setActionFirstRun (bool firstRun)
 Set action runs for the first time after the current rule changed. More...
 
void setBehaviorTree (BehaviorTree behaviorTree)
 Set behavior tree and reset state. More...
 
void setCondition (String name, Block condition)
 Set condition for name using block. More...
 
void setCondition (String name, BTCondition condition)
 Set condition for name. More...
 
void setConsole (Console console)
 Set console or null if not wishing to log anything. More...
 
void setCurrentRule (BTRule rule)
 Set current rule. More...
 
void setCurrentRuleByID (String id)
 Set current rule by identifier. More...
 
void setLoggingName (String name)
 Set logging name to tell apart logs. More...
 
void setLogRuleChanges (bool logRuleChanges)
 Set log behavior tree rule changes. More...
 
void setLogSteps (bool logSteps)
 Set log behavior tree steps. More...
 
void setRunAwayLimit (int limit)
 Set run away limit. More...
 
bool stepBehaviorTree ()
 Step behavior tree. More...
 
void writeToFile (PersistencyEnvironment env, FileWriter writer)
 Write state to file. More...
 

Public Attributes

BAAIBehaviorTree pAI
 AI. More...
 
- Public Attributes inherited from Dragengine.BehaviorTreeSystem.BTContext
bool pActionFirstRun
 
Dictionary pActions
 
BehaviorTree pBehaviorTree
 
Dictionary pConditions
 
Console pConsole
 
BTRule pCurrentRule
 
BTResult pLastResult
 
String pLoggingName
 
bool pLogRuleChanges
 
bool pLogSteps
 
Array pRunAwayList
 

Additional Inherited Members

- Protected Member Functions inherited from Dragengine.BehaviorTreeSystem.BTContext
void onCurrentRuleChanged ()
 Hook method called if setCurrentRule() is called. More...
 

Detailed Description

Behavior tree context with link to BAAIBehaviorTree.

Member Function Documentation

◆ getActor()

BehaviorElement Dragengine.Scenery.BAAIBehaviorTree.BTContextAI.getActor ( )

Actor.

◆ getAI()

BAAIBehaviorTree Dragengine.Scenery.BAAIBehaviorTree.BTContextAI.getAI ( )

AI.

◆ new() [1/4]

BTContextAI Dragengine.Scenery.BAAIBehaviorTree.BTContextAI.new ( BAAIBehaviorTree  ai,
BehaviorTree  behaviorTree 
)

Create context.

◆ new() [2/4]

BTContextAI Dragengine.Scenery.BAAIBehaviorTree.BTContextAI.new ( BAAIBehaviorTree  ai,
BTContext  context 
)

Create copy of context.

◆ new() [3/4]

BTContextAI Dragengine.Scenery.BAAIBehaviorTree.BTContextAI.new ( BAAIBehaviorTree  ai,
BTContext  context,
BehaviorTree  behaviorTree 
)

Create copy of context using different behavior tree.

◆ new() [4/4]

BTContextAI Dragengine.Scenery.BAAIBehaviorTree.BTContextAI.new ( BTContextAI  context)

Create copy of context.

Member Data Documentation

◆ pAI

BAAIBehaviorTree Dragengine.Scenery.BAAIBehaviorTree.BTContextAI.pAI

AI.


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