docs(scripting): add baseline api reference and guide
This commit is contained in:
31
docs/api/XCEngine/Scripting/ScriptEngine/OnFixedUpdate.md
Normal file
31
docs/api/XCEngine/Scripting/ScriptEngine/OnFixedUpdate.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# ScriptEngine::OnFixedUpdate
|
||||
|
||||
**命名空间**: `XCEngine::Scripting`
|
||||
|
||||
**类型**: `method`
|
||||
|
||||
**头文件**: `XCEngine/Scripting/ScriptEngine.h`
|
||||
|
||||
## 签名
|
||||
|
||||
```cpp
|
||||
void OnFixedUpdate(float fixedDeltaTime);
|
||||
```
|
||||
|
||||
## 当前实现行为
|
||||
|
||||
- 只在 `m_runtimeRunning` 为真时继续执行。
|
||||
- 复制当前脚本顺序表,按顺序遍历。
|
||||
- 对每个脚本要求同时满足:
|
||||
- `ShouldScriptRun(state)`
|
||||
- `EnsureScriptReady(state, true)`
|
||||
- `state.enabled == true`
|
||||
- 满足后调用运行时 `FixedUpdate` 生命周期。
|
||||
|
||||
## 设计意义
|
||||
|
||||
复制顺序表再遍历,可以避免遍历过程中容器被增删时直接打乱当前帧顺序。
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OnUpdate](OnUpdate.md)
|
||||
Reference in New Issue
Block a user