Drag[en]gine Script Module DragonScript  1.23
Dragengine.StateMachineSystem.SMConditionCombine Class Reference

State machine condition combinding one or more conditions. More...

Inheritance diagram for Dragengine.StateMachineSystem.SMConditionCombine:
Dragengine.StateMachineSystem.SMCondition

Classes

enum  Mode
 Combine modes. More...
 

Public Member Functions

void addCondition (String condition)
 Add condition. More...
 
bool evaluateCondition (SMContext context, Dictionary parameters)
 Evaluate condition. 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...
 
int indexOfCondition (String condition)
 Index of condition or -1 if absent. More...
 
SMConditionCombine new (Mode mode)
 Create condition. More...
 
SMConditionCombine new (Mode mode, String condition1, String condition2)
 Create condition using two conditions. More...
 
SMConditionCombine new (Mode mode, String condition1, String condition2, String condition3)
 Create condition using three conditions. More...
 
SMConditionCombine 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...
 

Detailed Description

State machine 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.StateMachineSystem.SMConditionCombine.addCondition ( String  condition)

Add condition.

◆ evaluateCondition()

bool Dragengine.StateMachineSystem.SMConditionCombine.evaluateCondition ( SMContext  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.StateMachineSystem.SMCondition.

◆ forEachCondition()

void Dragengine.StateMachineSystem.SMConditionCombine.forEachCondition ( Block  ablock)

Visit conditions with block with parameter String.

◆ getConditionAt()

String Dragengine.StateMachineSystem.SMConditionCombine.getConditionAt ( int  index)

Get condition at index.

◆ getConditionCount()

int Dragengine.StateMachineSystem.SMConditionCombine.getConditionCount ( )

Number of conditions.

◆ indexOfCondition()

int Dragengine.StateMachineSystem.SMConditionCombine.indexOfCondition ( String  condition)

Index of condition or -1 if absent.

◆ new() [1/4]

SMConditionCombine Dragengine.StateMachineSystem.SMConditionCombine.new ( Mode  mode)

Create condition.

◆ new() [2/4]

SMConditionCombine Dragengine.StateMachineSystem.SMConditionCombine.new ( Mode  mode,
String  condition1,
String  condition2 
)

Create condition using two conditions.

◆ new() [3/4]

SMConditionCombine Dragengine.StateMachineSystem.SMConditionCombine.new ( Mode  mode,
String  condition1,
String  condition2,
String  condition3 
)

Create condition using three conditions.

◆ new() [4/4]

SMConditionCombine Dragengine.StateMachineSystem.SMConditionCombine.new ( Mode  mode,
String  condition1,
String  condition2,
String  condition3,
String  condition4 
)

Create condition using four conditions.

◆ removeAllConditions()

void Dragengine.StateMachineSystem.SMConditionCombine.removeAllConditions ( )

Remove all conditions.

◆ removeCondition()

void Dragengine.StateMachineSystem.SMConditionCombine.removeCondition ( String  condition)

Remove condition.


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