This commit is contained in:
2026-08-29 17:28:00 +08:00
parent 1790ec6115
commit efdf80dcbd
22 changed files with 417444 additions and 971121 deletions
+9 -4
View File
@@ -56,6 +56,8 @@ public class SitPosData : MonoBehaviour
public Transform tSYPTParent;
[Tooltip("特殊鱼炮台(钻头)是否正在使用:true=期间禁用普通开火,点击只发射钻头")]
public bool isDrillActive;
[Tooltip("激光锁定:true=激光发射期间炮台锁定方向,SetRotation 不生效(原方向打到爆奖结束)")]
public bool isLaserLocked;
// -------------------------
// 炮台管理(动态克隆)
// -------------------------
@@ -272,9 +274,9 @@ public class SitPosData : MonoBehaviour
return;
}
// 起点:创建子弹的位置(世界坐标 Z=0 平面,和 FireBullet 的 startPos 一致)
// 起点:创建子弹的位置(Z=-50,战神激光显示层,和 FireBullet 的 startPos 同源仅 Z 不同)
Vector3 start = GetBulletStartPos();
start.z = 0f;
start.z = -50f;
// 需要几条就创建几条(三发=3个 LineRenderer),多余的隐藏
for (int i = 0; i < _laserTargets.Count; i++)
@@ -284,9 +286,9 @@ public class SitPosData : MonoBehaviour
if (!line.gameObject.activeSelf)
line.gameObject.SetActive(true);
// 终点:该条锁定鱼的位置
// 终点:该条锁定鱼的位置(Z=-50,与起点同层)
Vector3 end = _laserTargets[i].position;
end.z = 0f;
end.z = -50f;
line.SetPosition(0, start);
line.SetPosition(1, end);
}
@@ -851,6 +853,9 @@ public class SitPosData : MonoBehaviour
// -------------------------
public void SetRotation(float angle)
{
// ⭐ 激光发射期间锁定方向:忽略旋转请求(激光沿原方向打到爆奖结束)
if (isLaserLocked) return;
currentAngle = angle;
// ⭐ 炮台旋转只作用于 turretRotate(所有需要旋转的父对象),其余不改
if (turretRotate != null)