Files
loneseDocument/Content/Blueprints/BP_TestItemCluster.md
meishibiezb a8bdf281ff update
2026-06-05 03:01:15 +08:00

55 lines
2.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# BP_TestItemCluster
## 基本信息
- **类型**: Blueprint (Actor)
- **父类**: Actor
- **源文件**: /Game/Blueprints/Playground/BP_TestItemCluster.BP_TestItemCluster
- **模块**: Content/Blueprints/Playground
## 功能概述
物品簇 Actor在场景中生成一组测试物品。通过 EventGraph4 事件, 15 节点)管理多个 BP_TestItem 的生成和排列,用于测试场景中大量物品的呈现效果。
## 设计用意
Playground 中用于测试批量物品生成和布局的 Actor依赖 BP_TestItem 作为子物品模板,验证物品在场景中的集群表现。
## 职责范围
- 生成和管理多个 BP_TestItem 实例
- 控制物品簇在场景中的布局
## 项目内依赖
| 依赖项 | 关系 | 源文件 |
|--------|------|--------|
| BP_TestItem | 引用(子物品) | /Game/Blueprints/Playground/BP_TestItem |
## 外部视角
BP_TestItemCluster 是 Actor 的子类,从外部调用者视角:
**EventGraph 事件**
| 事件 | 类型 | 触发时机 | 行为 |
|------|------|----------|------|
| `事件开始运行` | 原生覆盖 (BeginPlay) | Actor 生成时 | 设置定时器 → 10秒后触发 Resume |
| `事件Actor开始重叠` | 原生覆盖 (OnActorBeginOverlap) | 与其他 Actor 碰撞时 | 预留(当前无连线逻辑) |
| `事件Tick` | 原生覆盖 | 每帧 | 预留(当前无连线逻辑) |
| `Resume` | 自定义事件 | 定时器触发时 | 获取 DefaultSceneRoot 的子组件 → ForEach → Cast 到 ChildActorComponent → 验证 ChildActor 存在 → 取反销毁标记 → 设置新的 ChildActorClass |
**接口概览**
- 无自定义变量或公开函数
**外部交互方式**
- 放置在 Playground 关卡中,在场景中生成一组 BP_TestItem 实例
- 外部系统不直接与 BP_TestItemCluster 交互,通过关卡引用访问
## 使用方法
BP_TestItemCluster 在项目中的典型调用流程:
- **物品簇生成流程** — BeginPlay → 设置 Resume 定时器10秒循环→ 定时器触发 → 遍历子 ChildActorComponent → 随机切换子 Actor 类 → 测试不同物品类型的批量展示
## 用例
| 引用方 | 路径 | 用途 |
|--------|------|------|
| Playground | `/Game/地图关卡/Playground` | 关卡中的物品簇,演示批量物品生成和布局 |