载入中...
搜索中...
未找到
eve::npc_ai::NpcAgentState结构体 参考
Authoritative gameplay-entity link to one module-owned NPC agent. 更多...
#include <NpcAiECS.h>
Public 成员函数 | |
| Result< void > | releaseAgent (NpcAiWorld &world) |
| Releases the owned agent once and clears this component's handle. | |
静态 Public 成员函数 | |
| static Result< NpcAgentState > | create (NpcAiWorld &world, std::string_view behaviorId) |
| Creates the canonical module-owned agent referenced by this component. | |
Public 属性 | |
| AgentHandle | agent |
详细描述
Authoritative gameplay-entity link to one module-owned NPC agent.
- 备注
- The gameplay entity creates and releases the agent. Deferred ECS copies only copy the generation handle; release invalidates every copy. If the AI agent is destroyed first, release observes stale state and clears the link as NoOp. Runtime handles are transient and must be rebuilt from logical behavior ids after restore.
在文件 NpcAiECS.h 第 23 行定义.
成员函数说明
◆ create()
|
static |
Creates the canonical module-owned agent referenced by this component.
在文件 NpcAiECS.cpp 第 7 行定义.
引用了 created, eve::Result< T >::failure(), eve::Result< T >::success() , 以及 world.
◆ releaseAgent()
| Result< void > eve::npc_ai::NpcAgentState::releaseAgent | ( | NpcAiWorld & | world | ) |
Releases the owned agent once and clears this component's handle.
在文件 NpcAiECS.cpp 第 13 行定义.
引用了 agent, eve::Applied, eve::Result< T >::failure(), eve::RuntimeHandle< AgentHandleTag >::invalid(), eve::RuntimeHandle< Tag >::isValid(), eve::NoOp, eve::Status::success(), eve::Result< T >::success() , 以及 world.
类成员变量说明
◆ agent
| AgentHandle eve::npc_ai::NpcAgentState::agent |
在文件 NpcAiECS.h 第 24 行定义.
被这些函数引用 releaseAgent().
该结构体的文档由以下文件生成:
- src/modules/npc_ai/NpcAiECS.h
- src/modules/npc_ai/NpcAiECS.cpp