|
bool | Init (IEntity entity) |
|
◆ EvaluateConditions()
static bool SCR_ScenarioFrameworkActivationConditionBase.EvaluateConditions |
( |
SCR_EScenarioFrameworkLogicOperators |
operator, |
|
|
notnull array< ref SCR_ScenarioFrameworkActivationConditionBase > |
activationConditions, |
|
|
IEntity |
entity |
|
) |
| |
|
static |
Runs logical operator on activationConditions.
Operators exit early when appropriate. Each operator impliments its own function and loop for performance.
- Parameters
-
[in] | operator | Operators to apply on whole array. SCR_EScenarioFrameworkLogicOperators.NOT is interpreted as NAND. |
[in] | activationConditions | For logical consistency undefined (empty array) is interpreted as false. Therefore most use-cases should use EvaluateEmptyOrConditions` |
[in] | entity | LayerBase or trigger that conditions are registered on. |
- Returns
- Delegates to relevent logic funtion.
◆ EvaluateConditionsAND()
Runs logical AND on result of activationConditions.
Exits early of first failure.
- Parameters
-
[in] | activationConditions | Conditions that succeed or fail. Empty array returns true. |
[in] | entity | LayerBase or trigger that conditions are registered on. |
- Returns
- false if activationConditions is empty or if one condition was unsuccessful.
-
true if all succeed. false if activationConditions is empty.
◆ EvaluateConditionsNAND()
Runs logical NAND on result of activationConditions.
At least one condition must be false. Exits early of first failure. Fun fact, you can construct every binary logic gate with only NAND gates.
- Parameters
-
[in] | activationConditions | Conditions that succeed or fail. Empty array returns true. |
[in] | entity | LayerBase or trigger that conditions are registered on. |
- Returns
- true if activationConditions is empty or if one condition was unsuccessful.
◆ EvaluateConditionsOR()
Runs logical OR on result of activationConditions.
Exits early of first success.
- Parameters
-
[in] | activationConditions | Conditions that succeed or fail. Empty array returns true. |
[in] | entity | LayerBase or trigger that conditions are registered on. |
- Returns
- true if any succeed. false if activationConditions is empty.
◆ EvaluateConditionsXOR()
Array style XOR.
Exactly one condition has to succeed, otherwise false is returned. Exits early on second success.
- Parameters
-
[in] | activationConditions | Conditions that succeed or fail. Empty array returns true. |
[in] | entity | LayerBase or trigger that conditions are registered on. |
- Returns
- false if empty or if more than one condition was successful. true if Exactly one condition succeeded.
◆ EvaluateEmptyOrConditions()
static bool SCR_ScenarioFrameworkActivationConditionBase.EvaluateEmptyOrConditions |
( |
SCR_EScenarioFrameworkLogicOperators |
operator, |
|
|
notnull array< ref SCR_ScenarioFrameworkActivationConditionBase > |
activationConditions, |
|
|
IEntity |
entity |
|
) |
| |
|
static |
Runs logical operator on activationConditions.
Operators exit early when appropriate. Each operator impliments its own function and loop for performance.
- Parameters
-
[in] | operator | Operators to apply on whole array. SCR_EScenarioFrameworkLogicOperators.NOT is interpreted as NAND. |
[in] | activationConditions | Conditions that succeed or fail. Empty array returns true. |
[in] | entity | LayerBase or trigger that conditions are registered on. |
- Returns
- If there are no conditions, returns true. Otherwise delegates to relevent logic funtion.
◆ Init()
bool SCR_ScenarioFrameworkActivationConditionBase.Init |
( |
IEntity |
entity | ) |
|
◆ m_bDebug
bool SCR_ScenarioFrameworkActivationConditionBase.m_bDebug |
The documentation for this interface was generated from the following file:
- Game/ScenarioFramework/Conditions/SCR_ScenarioFrameworkActivationConditionBase.c