Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Task_GetDeltaTime.h
Go to the documentation of this file.
1/**
2 * @file Task_GetDeltaTime.h
3 * @brief Atomic task that writes the current delta-time into the LocalBlackboard.
4 * @author Olympe Engine
5 * @date 2026-03-08
6 *
7 * @details
8 * Task_GetDeltaTime captures ctx.DeltaTime and stores it under the key
9 * "local:DeltaTime" in the entity's LocalBlackboard. Useful for tasks that
10 * need to read dt from the blackboard rather than from the context directly.
11 *
12 * No required parameters.
13 *
14 * Returns:
15 * Success always.
16 * Failure if ctx.LocalBB is null.
17 *
18 * C++14 compliant - no C++17/20 features.
19 */
20
21#pragma once
22
23#include "../../IAtomicTask.h"
24
25namespace Olympe {
26
27/**
28 * @class Task_GetDeltaTime
29 * @brief Writes ctx.DeltaTime to "local:DeltaTime" in the LocalBlackboard.
30 */
32public:
34
36 const ParameterMap& params) override;
37
38 TaskStatus Execute(const ParameterMap& params) override;
39
40 void Abort() override;
41};
42
43} // namespace Olympe
ComponentTypeID GetComponentTypeID_Static()
Definition ECS_Entity.h:56
Abstract interface for a single atomic unit of work.
Definition IAtomicTask.h:63
std::unordered_map< std::string, TaskValue > ParameterMap
Convenience alias for the parameter map passed to Execute().
Definition IAtomicTask.h:67
Writes ctx.DeltaTime to "local:DeltaTime" in the LocalBlackboard.
void Abort() override
Aborts the task, releasing any in-progress state.
TaskStatus Execute(const ParameterMap &params) override
Executes the atomic task for one frame.
TaskStatus ExecuteWithContext(const AtomicTaskContext &ctx, const ParameterMap &params) override
Executes the atomic task for one frame with full runtime context.
< Provides AssetID and INVALID_ASSET_ID
TaskStatus
Result code returned by IAtomicTask::Execute().
Definition IAtomicTask.h:38
Lightweight context bundle passed to IAtomicTask::ExecuteWithContext().