Pathmover
Pathmover 是沿基于 Line 和 Curve 的路径移动 MU 的基本组件。Pathmover 组件必须与 MU 和 Source 脚本位于同一 Game Object 层级。
Pathmover 通过绘制 3 条射线来维护与其他 Pathmover 之间的距离。一条直线向前,两条向侧面。一旦距离(Distance / Distance Sides)低于定义的值,Pathmover 开始减速(如果 Drive 有定义的加速度)或立即停止。一旦距离恢复到定义值之上,Pathmover 开始再次加速。
公共属性
Create On Path
定义 Source 应该在哪个路径上创建 Pathmover。

Leave Path
如果设置为 true,Pathmover 在到达没有后继的路径末端时将离开路径。MU(Transportable)将完全由物理控制。
Align with Path
如果为 true,将 Pathmover 与路径切线对齐。
Distance
Pathmover 为直线射线保持的距离(米)。
Distance Sides
Pathmover 为侧面射线保持的距离(米)。
Angle Side
侧面射线的角度。
Draw Ray
Align Vector
应与路径对齐的 Pathmover 向量。
Current Station
Pathmover 的当前工作站。进入时分配,离开时清除。
Current Station Working
当前正在工作的站,值在工作站的�作时间开始时设置。
Is Stopping
当 Pathmover 正在减速时为 true。
Is Starting
当 Pathmover 正在加速时为 true。
Is Stopped
当 Pathmover 已停止时为 true(例如在路径末端或工作站中)。
Is Blocked
当 Pathmover 被阻塞时为 true(例如被前面的 Pathmover 阻塞)。
Is On Path End
当 Pathmover 在路径末端时为 true。
Path
当前路径。
Position
当前在路径上的位置(米)。
事件
Pathmover 有几个事件,您可以将自定义代码分配给这些事件。
Path Events
OnPathEntered (SimulationPath, PathMover)
当 Pathmover 进入新路径时触发。
OnPathEnd (SimulationPath, PathMover)
当 Pathmover 在路径末端时触发。
OnPathExit (SimulationPath, PathMover)
Pathmover 正在离开路径。
OnStopping (SimulationPath, PathMover)
Pathmover 开始停止(减速)。
OnStopped (SimulationPath, PathMover)
Pathmover 完全停止。
OnStart (SimulationPath, PathMover)
Pathmover 开始启动(加速)。
OnFullyStarted (SimulationPath, PathMover)
Pathmover 达到全速。
OnBlocked (SimulationPath, PathMover)
Pathmover 被阻塞。
Station Events
OnStationEntered (BaseStation, PathMover)
Pathmover 已�入工作站。
OnStationWorkStarting(BaseStation, PathMover)
Pathmover 已在工作站中开始工作。
OnStationWorkFinished(BaseStation, PathMover)
Pathmover 已在工作站中完成工作。
OnStationExit(BaseStation, PathMover)
Pathmover 已离开工作站。