Mass Battle Frameworkv1.20.0

Gather.h

USTRUCT ×2

Source/MassBattle/Public/Fragments/Gather.h

概述Overview

收集(Gather,拾取战利品)系统的 fragment 集合:配置 FGather(收集半径/高度、战利品过滤查询、最大并发收集数、检测冷却)与运行时状态 FGathering(当前目标战利品列表与检测冷却剩余时间)。

Gather (loot collection) fragment collection: config FGather (gather radius/height, loot filter query, max concurrent collections, detection cooldown) and runtime state FGathering (current target loot list and remaining detection cooldown).

FGather USTRUCT

收集配置 fragment(FA_MassBattleBaseFragment 派生)。默认 bEnable = false。经 MASS_FRAGMENT_ACCEPT_NOT_TRIVIALLY_COPYABLE 声明为不可平凡拷贝(含 FMassBattleQuery 成员)。

Gather config fragment (derived from FA_MassBattleBaseFragment). Defaults bEnable = false. Declared via MASS_FRAGMENT_ACCEPT_NOT_TRIVIALLY_COPYABLE as not-trivially-copyable (contains FMassBattleQuery).

成员变量Members

名称Name类型Type默认值说明Description
bEnableboolfalse启用收集。Enable gathering.
GatherRadiusfloat200.0f收集半径——此范围内的战利品将被收集。Gather radius — loot within this range will be collected.
GatherHeightfloat200.0f收集高度(垂直范围)。Gather height (vertical range).
LootQueryFMassBattleQuery—战利品过滤查询。Loot filter query.
MaxConcurrentCollectionsint32100最大并发收集数。Max concurrent collections.
DetectionCooldownfloat0.5f检测冷却时长(秒)。Detection cooldown (seconds).

FGathering USTRUCT

收集运行时状态 fragment(FA_MassBattleBaseFragment 派生)。由收集处理器逐帧更新:目标战利品实体列表与检测冷却倒计时。经 MASS_FRAGMENT_ACCEPT_NOT_TRIVIALLY_COPYABLE 声明为不可平凡拷贝(含 TArray 成员)。

Gather runtime state fragment (derived from FA_MassBattleBaseFragment), updated per frame by the gather processor: target loot entity list and detection cooldown countdown. Declared via MASS_FRAGMENT_ACCEPT_NOT_TRIVIALLY_COPYABLE as not-trivially-copyable (contains TArray).

成员变量Members

名称Name类型Type默认值说明Description
CurrentTargetsTArray<FEntityHandle>空empty正在收集的目标战利品。Current target loots being collected.
DetectionCooldownTimeLeftfloat0.0f检测冷却剩余时间。Detection cooldown time left.

管线角色Pipeline Role

FGather / FGathering 由收集路径读取(grep 验证:MassBattleAgentReactionProcessor、MassBattleAgentTraceProcessor、MassBattleAgentSubsystem 均引用)。反应处理器按 DetectionCooldown 节流检测,查询 LootQuery 过滤的目标战利品写入 CurrentTargets,逐项执行收集。

FGather / FGathering are read by the gather paths (verified by grep: MassBattleAgentReactionProcessor, MassBattleAgentTraceProcessor, MassBattleAgentSubsystem). The reaction processor throttles detection by DetectionCooldown, queries loot filtered by LootQuery into CurrentTargets, and performs each collection.