![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Per-entity runtime state for task graph execution. More...
#include <TaskRunnerComponent.h>
Public Types | |
| enum class | TaskStatus : uint8_t { Success , Failure , Running , Aborted } |
| Possible outcomes of a task node execution. More... | |
Public Member Functions | |
| TaskRunnerComponent () | |
| ~TaskRunnerComponent () | |
| TaskRunnerComponent (TaskRunnerComponent &&)=default | |
| TaskRunnerComponent & | operator= (TaskRunnerComponent &&)=default |
| TaskRunnerComponent (const TaskRunnerComponent &)=delete | |
| TaskRunnerComponent & | operator= (const TaskRunnerComponent &)=delete |
Public Attributes | |
| AssetID | GraphTemplateID = INVALID_ASSET_ID |
| AssetID of the TaskGraphTemplate driving this runner. | |
| std::string | graphAssetPath |
| Path to the ATS Visual Script JSON asset file (.json). | |
| int32_t | CurrentNodeID = NODE_INDEX_NONE |
| ID of the currently active node. | |
| float | StateTimer = 0.0f |
| Accumulated time (in seconds) spent in the current node state. | |
| std::unordered_map< std::string, Olympe::TaskValue > | LocalBlackboard |
| Typed local blackboard for per-entity state. | |
| TaskStatus | LastStatus = TaskStatus::Success |
| Status returned by the last completed node execution. | |
| std::unique_ptr< IAtomicTask > | activeTask |
| Owning pointer to the IAtomicTask instance that is currently executing for this runner. | |
| std::string | ActiveExecPinName |
| Name of the active exec pin on the current node (e.g. "Then", "Else", "Loop"). | |
| int32_t | SequenceChildIndex = 0 |
| For VSSequence: index of the next child to execute. | |
| std::unordered_map< int32_t, bool > | DoOnceFlags |
| Per-node "already fired" flag for DoOnce nodes (key = nodeID). | |
| std::unordered_map< std::string, Olympe::TaskValue > | DataPinCache |
| Frame-local cache of computed data pin values (key = "nodeID:pinName"). | |
Per-entity runtime state for task graph execution.
Fields:
Definition at line 56 of file TaskRunnerComponent.h.
Possible outcomes of a task node execution.
| Enumerator | |
|---|---|
| Success | The node completed successfully. |
| Failure | The node failed. |
| Running | The node is still executing (will be called again next frame). |
| Aborted | Execution was interrupted externally. |
Definition at line 66 of file TaskRunnerComponent.h.
|
default |
|
default |
|
default |
|
delete |
|
delete |
|
default |
| std::string Olympe::TaskRunnerComponent::ActiveExecPinName |
Name of the active exec pin on the current node (e.g. "Then", "Else", "Loop").
Definition at line 108 of file TaskRunnerComponent.h.
| std::unique_ptr<IAtomicTask> Olympe::TaskRunnerComponent::activeTask |
Owning pointer to the IAtomicTask instance that is currently executing for this runner.
nullptr when no task is in flight. Persisted across frames so that tasks returning Running are re-ticked on the next Process() call. Replaced (old task Abort()ed) when the system advances to a different node.
Definition at line 105 of file TaskRunnerComponent.h.
| int32_t Olympe::TaskRunnerComponent::CurrentNodeID = NODE_INDEX_NONE |
ID of the currently active node.
Definition at line 89 of file TaskRunnerComponent.h.
Referenced by Olympe::VSGraphExecutor::HandleSubGraph().
| std::unordered_map<std::string, Olympe::TaskValue> Olympe::TaskRunnerComponent::DataPinCache |
Frame-local cache of computed data pin values (key = "nodeID:pinName").
Definition at line 117 of file TaskRunnerComponent.h.
Per-node "already fired" flag for DoOnce nodes (key = nodeID).
Definition at line 114 of file TaskRunnerComponent.h.
| std::string Olympe::TaskRunnerComponent::graphAssetPath |
Path to the ATS Visual Script JSON asset file (.json).
When set, TaskSystem can load the template from this path via TaskGraphLoader::LoadFromFile() if GraphTemplateID is not yet resolved by AssetManager.
Definition at line 86 of file TaskRunnerComponent.h.
| AssetID Olympe::TaskRunnerComponent::GraphTemplateID = INVALID_ASSET_ID |
AssetID of the TaskGraphTemplate driving this runner.
Set to INVALID_ASSET_ID when no template is bound.
Definition at line 80 of file TaskRunnerComponent.h.
| TaskStatus Olympe::TaskRunnerComponent::LastStatus = TaskStatus::Success |
Status returned by the last completed node execution.
Definition at line 98 of file TaskRunnerComponent.h.
| std::unordered_map<std::string, Olympe::TaskValue> Olympe::TaskRunnerComponent::LocalBlackboard |
Typed local blackboard for per-entity state.
Definition at line 95 of file TaskRunnerComponent.h.
| int32_t Olympe::TaskRunnerComponent::SequenceChildIndex = 0 |
For VSSequence: index of the next child to execute.
Definition at line 111 of file TaskRunnerComponent.h.
| float Olympe::TaskRunnerComponent::StateTimer = 0.0f |
Accumulated time (in seconds) spent in the current node state.
Definition at line 92 of file TaskRunnerComponent.h.