class MAGES::ConditionData¶
Overview¶
Base Class for a condition. More…
class ConditionData
{
public:
// enums
enum CheckResult;
// fields
bool fail = false;
bool negate = false;
bool critical = false;
string description = string.Empty;
// properties
bool IsInitialized;
// methods
void InitializeInternal(BaseActionData data);
void UndoInternal();
virtual void Initialize();
virtual void Undo();
CheckResult CheckInternal();
virtual bool Check();
};
// direct descendants
class ActionCompletionConditionData;
class QuestionAnswerConditionData;
class TimeLimitConditionData;
class UseInteractableAtConditionData;
Detailed Documentation¶
Base Class for a condition.
Fields¶
bool fail = false
Fail when this condition is met, instead of Halt.
bool negate = false
Invert the condition. Pass if condition is false, and Halt/Fail if true.
bool critical = false
Whether this condition is critical. If fail is set, then the whole operation must be redone.
Properties¶
bool IsInitialized
Gets a value indicating whether Initialize has run without a matching Undo.
Methods¶
virtual bool Check()
Performs the check and returns whether it passed or failed.
Returns:
A value indicating whether the condition is satisfied or not.