Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
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.
bool evaluateCondition (SMContext context, Dictionary parameters)
 Evaluate condition.
String findCondition (Block ablock)
 Find condition with block with parameter String.
void forEachCondition (Block ablock)
 Visit conditions with block with parameter String.
String getConditionAt (int index)
 Get condition at index.
int getConditionCount ()
 Number of conditions.
Mode getMode ()
 Combine mode from eCombineModes.
int indexOfCondition (String condition)
 Index of condition or -1 if absent.
SMConditionCombine new (Mode mode)
 Create condition.
SMConditionCombine new (Mode mode, String condition1, String condition2)
 Create condition using two conditions.
SMConditionCombine new (Mode mode, String condition1, String condition2, String condition3)
 Create condition using three conditions.
SMConditionCombine new (Mode mode, String condition1, String condition2, String condition3, String condition4)
 Create condition using four conditions.
void removeAllConditions ()
 Remove all conditions.
void removeCondition (String condition)
 Remove condition.
void setMode (Mode mode)
 Set combine mode from eCombineModes.

Public Attributes

Array pConditions
Mode pMode

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.

Referenced by evaluateCondition().

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

References addCondition(), evaluateCondition(), findCondition(), forEachCondition(), getMode(), new(), pConditions, pMode, removeAllConditions(), removeCondition(), and setMode().

Referenced by evaluateCondition().

◆ findCondition()

String Dragengine.StateMachineSystem.SMConditionCombine.findCondition ( Block ablock)

Find condition with block with parameter String.

Referenced by evaluateCondition().

◆ forEachCondition()

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

Visit conditions with block with parameter String.

References pConditions.

Referenced by evaluateCondition().

◆ getConditionAt()

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

Get condition at index.

References new().

Referenced by setMode().

◆ getConditionCount()

int Dragengine.StateMachineSystem.SMConditionCombine.getConditionCount ( )

Number of conditions.

References new().

Referenced by getMode().

◆ getMode()

Mode Dragengine.StateMachineSystem.SMConditionCombine.getMode ( )

Combine mode from eCombineModes.

References getConditionCount(), and pConditions.

Referenced by evaluateCondition().

◆ indexOfCondition()

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

Index of condition or -1 if absent.

References pConditions, and pMode.

Referenced by setMode().

◆ new() [1/4]

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

Create condition.

References new(), pConditions, and pMode.

Referenced by evaluateCondition(), getConditionAt(), getConditionCount(), new(), new(), and removeCondition().

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

References new().

◆ new() [4/4]

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

Create condition using four conditions.

References pConditions, and pMode.

◆ removeAllConditions()

void Dragengine.StateMachineSystem.SMConditionCombine.removeAllConditions ( )

Remove all conditions.

References pMode.

Referenced by evaluateCondition().

◆ removeCondition()

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

Remove condition.

References new().

Referenced by evaluateCondition().

◆ setMode()

void Dragengine.StateMachineSystem.SMConditionCombine.setMode ( Mode mode)

Set combine mode from eCombineModes.

References getConditionAt(), indexOfCondition(), and pConditions.

Referenced by evaluateCondition().

Member Data Documentation

◆ pConditions

Array Dragengine.StateMachineSystem.SMConditionCombine.pConditions

◆ pMode

Mode Dragengine.StateMachineSystem.SMConditionCombine.pMode

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