Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Attributes | List of all members
Olympe::Condition Struct Reference

Describes a single condition expression for Branch/While nodes. More...

#include <TaskGraphTypes.h>

+ Collaboration diagram for Olympe::Condition:

Public Attributes

std::string leftMode
 "Pin" | "Variable" | "Const"
 
std::string leftPin
 If Pin mode: e.g. "Node#42.Out".
 
std::string leftVariable
 If Variable mode: e.g. "health".
 
TaskValue leftConstValue
 If Const mode: e.g. TaskValue(50)
 
std::string operatorStr
 "==", "!=", "<", ">", "<=", ">="
 
std::string rightMode
 "Pin" | "Variable" | "Const"
 
std::string rightPin
 If Pin mode: e.g. "Node#43.Out".
 
std::string rightVariable
 If Variable mode: e.g. "max_health".
 
TaskValue rightConstValue
 If Const mode: e.g. TaskValue(100)
 
VariableType compareType = VariableType::None
 Int, Float, Bool, String, Vector.
 

Detailed Description

Describes a single condition expression for Branch/While nodes.

Supports 6 combinations: Variable vs Variable (health < max_health) Variable vs Const (health > 50) Variable vs Pin (health == Node#42.Out) Pin vs Pin (Node#42.Out > Node#43.Out) Pin vs Const (Node#42.Out >= threshold) Const vs Const (50 < 100, for testing — W015 warning)

Multiple conditions on one node are evaluated with implicit AND.

Definition at line 372 of file TaskGraphTypes.h.

Member Data Documentation

◆ compareType

VariableType Olympe::Condition::compareType = VariableType::None

Int, Float, Bool, String, Vector.

Definition at line 389 of file TaskGraphTypes.h.

◆ leftConstValue

TaskValue Olympe::Condition::leftConstValue

If Const mode: e.g. TaskValue(50)

Definition at line 377 of file TaskGraphTypes.h.

◆ leftMode

std::string Olympe::Condition::leftMode

"Pin" | "Variable" | "Const"

Definition at line 374 of file TaskGraphTypes.h.

Referenced by Olympe::TaskGraphLoader::ParseNodeV4().

◆ leftPin

std::string Olympe::Condition::leftPin

If Pin mode: e.g. "Node#42.Out".

Definition at line 375 of file TaskGraphTypes.h.

◆ leftVariable

std::string Olympe::Condition::leftVariable

If Variable mode: e.g. "health".

Definition at line 376 of file TaskGraphTypes.h.

◆ operatorStr

std::string Olympe::Condition::operatorStr

"==", "!=", "<", ">", "<=", ">="

Definition at line 380 of file TaskGraphTypes.h.

◆ rightConstValue

TaskValue Olympe::Condition::rightConstValue

If Const mode: e.g. TaskValue(100)

Definition at line 386 of file TaskGraphTypes.h.

◆ rightMode

std::string Olympe::Condition::rightMode

"Pin" | "Variable" | "Const"

Definition at line 383 of file TaskGraphTypes.h.

◆ rightPin

std::string Olympe::Condition::rightPin

If Pin mode: e.g. "Node#43.Out".

Definition at line 384 of file TaskGraphTypes.h.

◆ rightVariable

std::string Olympe::Condition::rightVariable

If Variable mode: e.g. "max_health".

Definition at line 385 of file TaskGraphTypes.h.


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