11#include "../../AtomicTaskRegistry.h"
12#include "../../LocalBlackboard.h"
13#include "../../../system/system_utils.h"
34 const ParameterMap&
params)
38 SYSTEM_LOG <<
"[Task_Flee] No LocalBlackboard in context\n";
68 const TaskValue
posVal =
ctx.LocalBB->GetValueScoped(
"local:Position");
96 ctx.LocalBB->SetValueScoped(
"local:FleeTarget", TaskValue(
fleeTarget));
#define REGISTER_ATOMIC_TASK(ClassName, Id)
Registers a factory for ClassName under Id at static init time.
Atomic task that computes a flee direction away from a target.
ComponentTypeID GetComponentTypeID_Static()
void Abort() override
Aborts the task, releasing any in-progress state.
TaskStatus Execute(const ParameterMap ¶ms) override
Executes the atomic task for one frame.
TaskStatus ExecuteWithContext(const AtomicTaskContext &ctx, const ParameterMap ¶ms) override
Executes the atomic task for one frame with full runtime context.
< Provides AssetID and INVALID_ASSET_ID
@ Float
Single-precision float.
@ Vector
3-component vector (Vector from vector.h)
TaskStatus
Result code returned by IAtomicTask::Execute().
@ Success
Task completed successfully.
static const float DEFAULT_FLEE_DISTANCE