UBot Clock Subsystem
一个 Game 或 PIE 世界的仿真时钟:读取仿真时间和帧数,设置固定步长,暂停、恢复和单步。
Get Remaining Step Frames
Section titled “Get Remaining Step Frames”Get Remaining Step FramesTarget is UBot Clock SubsystemTargetReturn Value
单步还剩多少个 world tick;没有单步在进行时为 0。
| 引脚 | 方向 | 类型 |
|---|---|---|
| Return Value | 输出 | Integer |
Get Sim Frame
Section titled “Get Sim Frame”Get Sim FrameTarget is UBot Clock SubsystemTargetReturn Value
游戏时间前进过的 world tick 数。世界暂停时不增加。
| 引脚 | 方向 | 类型 |
|---|---|---|
| Return Value | 输出 | Integer64 |
Get Sim Time Seconds
Section titled “Get Sim Time Seconds”Get Sim Time SecondsTarget is UBot Clock SubsystemTargetReturn Value
当前 World 的 uBot 仿真时间(秒)。所有 uBot 时间戳都用这个时间。
| 引脚 | 方向 | 类型 |
|---|---|---|
| Return Value | 输出 | Float (double) |
Is Fixed Time Step Enabled
Section titled “Is Fixed Time Step Enabled”Is Fixed Time Step EnabledTarget is UBot Clock SubsystemTargetReturn Value
引擎当前是否启用了固定步长(整个进程共用)。
| 引脚 | 方向 | 类型 |
|---|---|---|
| Return Value | 输出 | Boolean |
Is Simulation Paused
Section titled “Is Simulation Paused”Is Simulation PausedTarget is UBot Clock SubsystemTargetReturn Value
当前世界是否处于暂停。
| 引脚 | 方向 | 类型 |
|---|---|---|
| Return Value | 输出 | Boolean |
Pause Simulation
Section titled “Pause Simulation”Pause SimulationTarget is UBot Clock SubsystemTarget
暂停游戏,并取消尚未完成的单步。
Resume Simulation
Section titled “Resume Simulation”Resume SimulationTarget is UBot Clock SubsystemTarget
取消暂停并取消尚未完成的单步,世界自由运行。
Set Fixed Time Step
Section titled “Set Fixed Time Step”Set Fixed Time StepTarget is UBot Clock SubsystemTargetEnabledStep Hz60.0
启用或关闭引擎的固定步长(整个进程共用)。Step Hz 限制在 1 到 1000 Hz;最后一个改过它的时钟销毁时,恢复原来的值。
| 引脚 | 方向 | 类型 | 默认值 |
|---|---|---|---|
EnabledbEnabled | 输入 | Boolean | false |
| Step Hz | 输入 | Float (double) | 60.0 |
Step Simulation
Section titled “Step Simulation”Step SimulationTarget is UBot Clock SubsystemTargetNum Frames1Return Value
取消暂停,恰好运行 Num Frames 个 world tick 后再暂停;只算调用之后开始的 tick。Num Frames 小于 1 或无法取消暂停时返回 false;单步进行中再调用,会累加剩余帧数。
| 引脚 | 方向 | 类型 | 默认值 |
|---|---|---|---|
| Num Frames | 输入 | Integer | 1 |
| Return Value | 输出 | Boolean |