Files
XCEngine/docs/api/XCEngine/Components/GameObject/Update.md

26 lines
485 B
Markdown
Raw Normal View History

2026-03-26 16:45:24 +08:00
# GameObject::Update
2026-04-03 16:11:48 +08:00
向当前对象及其子树分发逐帧 `Update(deltaTime)`
2026-03-26 16:45:24 +08:00
```cpp
void Update(float deltaTime);
```
2026-04-03 16:11:48 +08:00
## 行为说明
2026-03-26 16:45:24 +08:00
2026-04-03 16:11:48 +08:00
当前实现会:
2026-03-26 16:45:24 +08:00
2026-04-03 16:11:48 +08:00
- 若对象不处于 `active in hierarchy`,直接返回
- 对所有已启用普通组件调用 `Update(deltaTime)`
- 递归对子对象调用 `Update(deltaTime)`
2026-03-26 16:45:24 +08:00
2026-04-03 16:11:48 +08:00
## 参数
2026-03-26 16:45:24 +08:00
2026-04-03 16:11:48 +08:00
- `deltaTime` - 当前变步长帧时间。
2026-03-26 16:45:24 +08:00
## 相关文档
2026-04-03 16:11:48 +08:00
- [Start](Start.md)
- [FixedUpdate](FixedUpdate.md)
- [LateUpdate](LateUpdate.md)