1
This commit is contained in:
@@ -482,21 +482,24 @@ public class MonsterContral : MonoBehaviour
|
||||
// ⭐ 缓存 yzID 前3字符前缀,避免 UpdateYZMovement 每帧每鱼 Substring 产生 GC
|
||||
SetYzPrefix(yzID);
|
||||
|
||||
// 鱼阵特殊处理:700 系扇形阵根据起点 y 值翻转朝向
|
||||
if (isyuzhen && _yzPrefix == "700")
|
||||
// ⭐ 700系扇形阵按起点y值翻转朝向:绕Z轴+180°旋转
|
||||
// (原为 scale.y 镜像翻转,负缩放有法线翻转/特效异常等副作用;
|
||||
// rotation 由 Pool.Get 每次重置为本次生成角度,天然无池复用残留)
|
||||
bool flipY700 = isyuzhen && _yzPrefix == "700" && bezierData.start.y < 0;
|
||||
if (flipY700)
|
||||
{
|
||||
if (bezierData.start.y < 0)
|
||||
{
|
||||
var scale = transform.localScale;
|
||||
scale.y *= -1f;
|
||||
transform.localScale = scale;
|
||||
}
|
||||
transform.Rotate(Vector3.forward, 180f, Space.Self);
|
||||
}
|
||||
|
||||
// ⭐ 预计算 700/701 直线阵的世界起点 + 方向系数
|
||||
// 原逻辑每帧每鱼 CanvasToWorld(start) + 判断 goUp,现 Init 一次性算好
|
||||
CacheYzLineMoveData(bezierData);
|
||||
|
||||
// ⭐ 翻转(Z+180°)后 transform.up 反向,700 直线阵移动方向同步取反,
|
||||
// 保持实际游向与翻转前一致(否则起点y<0的700阵鱼会反向游)
|
||||
if (flipY700)
|
||||
_yzLineDir = -_yzLineDir;
|
||||
|
||||
fishenum = (FishTypeEnum)monsterData.fishTypeConfig.fishType;
|
||||
|
||||
// isMove=false 的鱼不需要移动路线,直接归位到 (0,0,0)
|
||||
|
||||
@@ -1157,6 +1157,10 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
mc.moveTime = (BeijingTimeManager.Instance.CurrentTimestampMs - time) / 1000f;
|
||||
|
||||
mc.Init(pathId.ToString(), cfg.times, true, yz.arrayNumber);
|
||||
|
||||
// ⭐ 鱼阵调试日志:输出每条子鱼生成后的旋转与缩放(排查"有的正有的反")
|
||||
Debug.Log($"[鱼阵调试] 阵={yz.arrayNumber}(扇形700) pathId={pathId} 第{i}/{16}条 guid={mc.guid} " +
|
||||
$"rotation={fish.transform.eulerAngles.ToString("F1")} localScale={fish.transform.localScale.ToString("F3")}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1188,6 +1192,10 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
mc.moveTime = (BeijingTimeManager.Instance.CurrentTimestampMs - time) / 1000f;
|
||||
|
||||
mc.Init(pathId.ToString(), cfg.times, true, yz.arrayNumber);
|
||||
|
||||
// ⭐ 鱼阵调试日志:输出每条子鱼生成后的旋转与缩放(排查"有的正有的反")
|
||||
Debug.Log($"[鱼阵调试] 阵={yz.arrayNumber}(环形701) pathId={pathId} 第{i + 1}/{count}条 guid={mc.guid} " +
|
||||
$"rotation={fish.transform.eulerAngles.ToString("F1")} localScale={fish.transform.localScale.ToString("F3")}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1239,6 +1247,10 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
// ⭐ 路线用 FishYZ 取到的第 0 个,yzID 用 arrayNumber
|
||||
mc.Init(yzPathId.ToString(), cfg.times, true, yz.arrayNumber);
|
||||
|
||||
// ⭐ 鱼阵调试日志:输出每条子鱼生成后的旋转与缩放(排查"有的正有的反")
|
||||
Debug.Log($"[鱼阵调试] 阵={yz.arrayNumber}(顺序阵) pathId={yzPathId} 第{i + 1}/{yz.fishCount}条 guid={mc.guid} " +
|
||||
$"rotation={fish.transform.eulerAngles.ToString("F1")} localScale={fish.transform.localScale.ToString("F3")}");
|
||||
|
||||
yield return new WaitForSeconds(1f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ MonoBehaviour:
|
||||
cachedUirootRect: {fileID: 0}
|
||||
skeleton: {fileID: 0}
|
||||
isSpine: 1
|
||||
fishTypeID: 0
|
||||
fishTypeID: 11042
|
||||
currState: 0
|
||||
HP: 5
|
||||
effect_Die: {fileID: 0}
|
||||
@@ -179,8 +179,8 @@ MonoBehaviour:
|
||||
type: 3}
|
||||
currEffect_DieAward: {fileID: 0}
|
||||
isMove: 1
|
||||
is3D: 0
|
||||
forwordXYZ:
|
||||
is3D: 1
|
||||
forwordXYZ: Z
|
||||
fishenum: 0
|
||||
moveTime: 0
|
||||
isyz: 0
|
||||
@@ -194,9 +194,9 @@ MonoBehaviour:
|
||||
createVideoClip: {fileID: 0}
|
||||
rotationPY: 60
|
||||
baseMmove: 0
|
||||
isRotate: 0
|
||||
isRotate: 1
|
||||
isNot1: 0
|
||||
ischild0: 0
|
||||
ischild0: 1
|
||||
depthOffset: 0
|
||||
is2DFish: 0
|
||||
sortOrder2D: 0
|
||||
|
||||
Reference in New Issue
Block a user