1
This commit is contained in:
@@ -788,6 +788,12 @@ public class MonsterContral : MonoBehaviour
|
||||
/// <param name="nextPos">下一帧目标位置</param>
|
||||
private void ApplyFacingDirection(Vector2 nextPos)
|
||||
{
|
||||
// ⭐ 700/701扇形/圈鱼阵特殊处理:出生时生成端已设好分布角度,Init时已缓存移动方向(_yzMoveDir),
|
||||
// 之后全程跳过一切旋转/摆位/镜像逻辑——任何路径调用都直接返回,保证阵型姿态绝不被触碰。
|
||||
// (_isYzLineMove 由 CacheYzLineMoveData 在 Init 内设置,仅 700/701 为 true,出生后立即生效)
|
||||
if (_isYzLineMove)
|
||||
return;
|
||||
|
||||
// ⭐ 使用 OnEnable 缓存的 _cachedChild,避免每帧 transform.GetChild(0) 调用开销
|
||||
// 兜底:缓存丢失时重新获取一次(理论上不会发生)
|
||||
Transform child = _cachedChild;
|
||||
|
||||
Reference in New Issue
Block a user