Drag[en]gine Script Module DragonScript  1.23
Dragengine.BehaviorTreeSystem.BTConditionCombine Class Reference

Behavior tree condition combinding one or more conditions. More...

Inheritance diagram for Dragengine.BehaviorTreeSystem.BTConditionCombine:
Dragengine.BehaviorTreeSystem.BTCondition

Classes

enum  Mode
 Combine modes. More...
 

Public Member Functions

void addCondition (String condition)
 Add condition. More...
 
bool evaluateCondition (BTContext context, Dictionary parameters)
 Evaluate condition. More...
 
String findCondition (Block ablock)
 Find condition with block with parameter String. More...
 
void forEachCondition (Block ablock)
 Visit conditions with block with parameter String. More...
 
String getConditionAt (int index)
 Get condition at index. More...
 
int getConditionCount ()
 Number of conditions. More...
 
Mode getMode ()
 Combine mode from eCombineModes. More...
 
int indexOfCondition (String condition)
 Index of condition or -1 if absent. More...
 
BTConditionCombine new (Mode mode)
 Create condition. More...
 
BTConditionCombine new (Mode mode, String condition1, String condition2)
 Create condition using two conditions. More...
 
BTConditionCombine new (Mode mode, String condition1, String condition2, String condition3)
 Create condition using three conditions. More...
 
BTConditionCombine new (Mode mode, String condition1, String condition2, String condition3, String condition4)
 Create condition using four conditions. More...
 
void removeAllConditions ()
 Remove all conditions. More...
 
void removeCondition (String condition)
 Remove condition. More...
 
void setMode (Mode mode)
 Set combine mode from eCombineModes. More...
 

Public Attributes

Array pConditions
 
Mode pMode
 

Detailed Description

Behavior tree condition combinding one or more conditions.

Useful to create a complex condition out of group of simple conditions. The conditions are stored as identifiers so they can be reused.

Member Function Documentation

◆ addCondition()

void Dragengine.BehaviorTreeSystem.BTConditionCombine.addCondition ( String  condition)

Add condition.

◆ evaluateCondition()

bool Dragengine.BehaviorTreeSystem.BTConditionCombine.evaluateCondition ( BTContext  context,
Dictionary  parameters 
)

Evaluate condition.

Parameters
parametersDictionary with parameters of type String key and String value. Do not change the content of the dictionary as it is shared.

Implements Dragengine.BehaviorTreeSystem.BTCondition.

◆ findCondition()

String Dragengine.BehaviorTreeSystem.BTConditionCombine.findCondition ( Block  ablock)

Find condition with block with parameter String.

◆ forEachCondition()

void Dragengine.BehaviorTreeSystem.BTConditionCombine.forEachCondition ( Block  ablock)

Visit conditions with block with parameter String.

◆ getConditionAt()

String Dragengine.BehaviorTreeSystem.BTConditionCombine.getConditionAt ( int  index)

Get condition at index.

◆ getConditionCount()

int Dragengine.BehaviorTreeSystem.BTConditionCombine.getConditionCount ( )

Number of conditions.

◆ getMode()

Mode Dragengine.BehaviorTreeSystem.BTConditionCombine.getMode ( )

Combine mode from eCombineModes.

◆ indexOfCondition()

int Dragengine.BehaviorTreeSystem.BTConditionCombine.indexOfCondition ( String  condition)

Index of condition or -1 if absent.

◆ new() [1/4]

BTConditionCombine Dragengine.BehaviorTreeSystem.BTConditionCombine.new ( Mode  mode)

Create condition.

◆ new() [2/4]

BTConditionCombine Dragengine.BehaviorTreeSystem.BTConditionCombine.new ( Mode  mode,
String  condition1,
String  condition2 
)

Create condition using two conditions.

◆ new() [3/4]

BTConditionCombine Dragengine.BehaviorTreeSystem.BTConditionCombine.new ( Mode  mode,
String  condition1,
String  condition2,
String  condition3 
)

Create condition using three conditions.

◆ new() [4/4]

BTConditionCombine Dragengine.BehaviorTreeSystem.BTConditionCombine.new ( Mode  mode,
String  condition1,
String  condition2,
String  condition3,
String  condition4 
)

Create condition using four conditions.

◆ removeAllConditions()

void Dragengine.BehaviorTreeSystem.BTConditionCombine.removeAllConditions ( )

Remove all conditions.

◆ removeCondition()

void Dragengine.BehaviorTreeSystem.BTConditionCombine.removeCondition ( String  condition)

Remove condition.

◆ setMode()

void Dragengine.BehaviorTreeSystem.BTConditionCombine.setMode ( Mode  mode)

Set combine mode from eCombineModes.

Member Data Documentation

◆ pConditions

Array Dragengine.BehaviorTreeSystem.BTConditionCombine.pConditions

◆ pMode

Mode Dragengine.BehaviorTreeSystem.BTConditionCombine.pMode

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