Olympe Engine
2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Source
TaskSystem
AtomicTasks
AI
Task_SetAnimation.h
Go to the documentation of this file.
1
/**
2
* @file Task_SetAnimation.h
3
* @brief Atomic AI task that triggers an animation on an entity.
4
* @author Olympe Engine
5
* @date 2026-03-08
6
*
7
* @details
8
* Task_SetAnimation requests that a named animation be played on the entity.
9
* In headless mode it stores the animation reference in the LocalBlackboard
10
* under "local:current_animation". In World mode it can be extended to
11
* call an AnimationComponent via the ComponentFacade.
12
*
13
* Parameters (ParameterMap):
14
* "AnimRef" (String) — animation identifier / clip name (required).
15
* "Loop" (Bool) — whether to loop (optional, default true).
16
*
17
* Returns:
18
* Success after writing the animation request.
19
* Failure if "AnimRef" is missing or if ctx.LocalBB is null.
20
*
21
* C++14 compliant - no C++17/20 features.
22
*/
23
24
#pragma once
25
26
#include "../../IAtomicTask.h"
27
28
namespace
Olympe
{
29
30
/**
31
* @class Task_SetAnimation
32
* @brief Requests an animation clip to play on the entity.
33
*/
34
class
Task_SetAnimation
:
public
IAtomicTask
{
35
public
:
36
Task_SetAnimation
();
37
38
TaskStatus
ExecuteWithContext
(
const
AtomicTaskContext
&
ctx
,
39
const
ParameterMap
&
params
)
override
;
40
41
TaskStatus
Execute
(
const
ParameterMap
&
params
)
override
;
42
43
void
Abort
()
override
;
44
};
45
46
}
// namespace Olympe
GetComponentTypeID_Static
ComponentTypeID GetComponentTypeID_Static()
Definition
ECS_Entity.h:56
Olympe::IAtomicTask
Abstract interface for a single atomic unit of work.
Definition
IAtomicTask.h:63
Olympe::IAtomicTask::ParameterMap
std::unordered_map< std::string, TaskValue > ParameterMap
Convenience alias for the parameter map passed to Execute().
Definition
IAtomicTask.h:67
Olympe::Task_SetAnimation
Requests an animation clip to play on the entity.
Definition
Task_SetAnimation.h:34
Olympe::Task_SetAnimation::Task_SetAnimation
Task_SetAnimation()
Definition
Task_SetAnimation.cpp:17
Olympe::Task_SetAnimation::Abort
void Abort() override
Aborts the task, releasing any in-progress state.
Definition
Task_SetAnimation.cpp:19
Olympe::Task_SetAnimation::ExecuteWithContext
TaskStatus ExecuteWithContext(const AtomicTaskContext &ctx, const ParameterMap ¶ms) override
Executes the atomic task for one frame with full runtime context.
Definition
Task_SetAnimation.cpp:29
Olympe::Task_SetAnimation::Execute
TaskStatus Execute(const ParameterMap ¶ms) override
Executes the atomic task for one frame.
Definition
Task_SetAnimation.cpp:24
Olympe
< Provides AssetID and INVALID_ASSET_ID
Definition
BTEditorCommand.cpp:16
Olympe::TaskStatus
TaskStatus
Result code returned by IAtomicTask::Execute().
Definition
IAtomicTask.h:38
Olympe::AtomicTaskContext
Lightweight context bundle passed to IAtomicTask::ExecuteWithContext().
Definition
AtomicTaskContext.h:36
Generated on Mon Apr 13 2026 08:15:20 for Olympe Engine by
1.9.8