![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Writes a new AI state name to "local:current_state" in the LocalBlackboard. More...
#include <Task_ChangeState.h>
Inheritance diagram for Olympe::Task_ChangeState:
Collaboration diagram for Olympe::Task_ChangeState:Public Member Functions | |
| Task_ChangeState () | |
| TaskStatus | ExecuteWithContext (const AtomicTaskContext &ctx, const ParameterMap ¶ms) override |
| Executes the atomic task for one frame with full runtime context. | |
| TaskStatus | Execute (const ParameterMap ¶ms) override |
| Executes the atomic task for one frame. | |
| void | Abort () override |
| Aborts the task, releasing any in-progress state. | |
| Task_ChangeState () | |
| TaskStatus | ExecuteWithContext (const AtomicTaskContext &ctx, const ParameterMap ¶ms) override |
| Executes the atomic task for one frame with full runtime context. | |
| TaskStatus | Execute (const ParameterMap ¶ms) override |
| Executes the atomic task for one frame. | |
| void | Abort () override |
| Aborts the task, releasing any in-progress state. | |
Public Member Functions inherited from Olympe::IAtomicTask | |
| virtual | ~IAtomicTask ()=default |
Additional Inherited Members | |
Public Types inherited from Olympe::IAtomicTask | |
| using | ParameterMap = std::unordered_map< std::string, TaskValue > |
| Convenience alias for the parameter map passed to Execute(). | |
Writes a new AI state name to "local:current_state" in the LocalBlackboard.
Sets "local:CurrentState" in the entity's LocalBlackboard.
Definition at line 32 of file Task_ChangeState.h.
| Olympe::Task_ChangeState::Task_ChangeState | ( | ) |
Definition at line 19 of file Task_ChangeState.cpp.
| Olympe::Task_ChangeState::Task_ChangeState | ( | ) |
|
overridevirtual |
Aborts the task, releasing any in-progress state.
Called by the TaskSystem when execution is interrupted (e.g. a parent node is aborted or a new graph is bound while a task is Running). Concrete tasks must implement this to clean up timers, reservations, animations, or any other side-effects started in Execute().
Implements Olympe::IAtomicTask.
Definition at line 21 of file Task_ChangeState.cpp.
References SYSTEM_LOG.
|
overridevirtual |
Aborts the task, releasing any in-progress state.
Called by the TaskSystem when execution is interrupted (e.g. a parent node is aborted or a new graph is bound while a task is Running). Concrete tasks must implement this to clean up timers, reservations, animations, or any other side-effects started in Execute().
Implements Olympe::IAtomicTask.
|
overridevirtual |
Executes the atomic task for one frame.
| params | Named parameters provided by the task graph node. |
Implements Olympe::IAtomicTask.
Definition at line 26 of file Task_ChangeState.cpp.
References Olympe::Failure.
|
overridevirtual |
Executes the atomic task for one frame.
| params | Named parameters provided by the task graph node. |
Implements Olympe::IAtomicTask.
|
overridevirtual |
Executes the atomic task for one frame with full runtime context.
New tasks should override this method to access the richer context (World pointer, LocalBlackboard, EntityID, dt, StateTimer). The default implementation simply forwards to Execute(params) so all existing tasks remain compatible without any changes.
| ctx | Runtime context for this tick (Entity, World*, LocalBB, dt, StateTimer). |
| params | Named parameters provided by the task graph node. |
Reimplemented from Olympe::IAtomicTask.
Definition at line 31 of file Task_ChangeState.cpp.
References Olympe::TaskValue::AsString(), Olympe::BB_KEY_CURRENT_STATE, Olympe::Failure, GetComponentTypeID_Static(), Olympe::String, Olympe::Success, and SYSTEM_LOG.
Here is the call graph for this function:
|
overridevirtual |
Executes the atomic task for one frame with full runtime context.
New tasks should override this method to access the richer context (World pointer, LocalBlackboard, EntityID, dt, StateTimer). The default implementation simply forwards to Execute(params) so all existing tasks remain compatible without any changes.
| ctx | Runtime context for this tick (Entity, World*, LocalBB, dt, StateTimer). |
| params | Named parameters provided by the task graph node. |
Reimplemented from Olympe::IAtomicTask.