|
Drag[en]gine Script Module DragonScript 1.32.1
|
Helper class supporting both behavior tree and state machine actions and conditions. More...
Public Member Functions | |
| bool | evaluateCondition (BTContext context, Dictionary parameters) |
| bool | evaluateCondition (SMContext context, Dictionary parameters) |
| bool | evaluateConditionShared (Object context, Dictionary parameters) |
| Evaluate condition. | |
| BTSMActionCondition | new () |
| Create shared behavior tree and state machine action and condition. | |
| BTResult | runAction (BTContext context, Dictionary parameters) |
| void | runAction (SMContext context, Dictionary parameters) |
| BTResult | runActionShared (Object context, Dictionary parameters) |
| Run action shared. | |
Helper class supporting both behavior tree and state machine actions and conditions.
This class is useful to use the same set of actions and conditions for both behavior trees and state machines. State machine actions throw an exception if the shared action returns BTResult::failure.
To use actions overwrite #runAction(Dictionary). To use conditions overwrite #evaluateCondition(Dictionary).
| bool Dragengine.Utils.BTSMActionCondition.evaluateCondition | ( | BTContext | context, |
| Dictionary | parameters | ||
| ) |
| bool Dragengine.Utils.BTSMActionCondition.evaluateCondition | ( | SMContext | context, |
| Dictionary | parameters | ||
| ) |
| bool Dragengine.Utils.BTSMActionCondition.evaluateConditionShared | ( | Object | context, |
| Dictionary | parameters | ||
| ) |
Evaluate condition.
Context which can be either BTContext or SMContext.
Default implementation returns false.
| BTSMActionCondition Dragengine.Utils.BTSMActionCondition.new | ( | ) |
Create shared behavior tree and state machine action and condition.
| BTResult Dragengine.Utils.BTSMActionCondition.runAction | ( | BTContext | context, |
| Dictionary | parameters | ||
| ) |
| void Dragengine.Utils.BTSMActionCondition.runAction | ( | SMContext | context, |
| Dictionary | parameters | ||
| ) |
| BTResult Dragengine.Utils.BTSMActionCondition.runActionShared | ( | Object | context, |
| Dictionary | parameters | ||
| ) |
Run action shared.
For state machine use exception is thrown if the returned value is BTResult::failure. Default implementation returns BTResult::failure.
Context which can be either BTContext or SMContext.