1
This commit is contained in:
@@ -205,7 +205,7 @@ public class MonsterContral : MonoBehaviour
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
/// <summary>缓存的子物体(朝向控制用),避免每帧 transform.GetChild(0)</summary>
|
||||
private Transform _cachedChild;
|
||||
protected Transform _cachedChild;
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// ⭐ 鱼阵 700/701 直线移动缓存
|
||||
@@ -665,7 +665,7 @@ public class MonsterContral : MonoBehaviour
|
||||
/// 现在 Init 一次性算好,运行时直接用缓存值。
|
||||
/// 非直线阵(702/704/710 等)标记 _isYzLineMove=false 跳过。
|
||||
/// </summary>
|
||||
private void CacheYzLineMoveData(MonsterMoveLine.BezierCurveData bezierData)
|
||||
protected void CacheYzLineMoveData(MonsterMoveLine.BezierCurveData bezierData)
|
||||
{
|
||||
_isYzLineMove = false;
|
||||
_yzLineInited = false;
|
||||
|
||||
@@ -741,7 +741,7 @@ namespace Assets.MyGame.Scripts.Net
|
||||
string word = words[UnityEngine.Random.Range(0, words.Length)];
|
||||
|
||||
// 外层默认色 ECA895,关键字段用 ECB85F 覆盖
|
||||
string text = $"<color=#ECA895><color=#ECB85F>【{data.gameTypeName}】</color>{word}!恭喜:" +
|
||||
string text = $"<color=#ECA895><color=#ECB85F>【{data.gameTypeName}】</color>{word}!恭喜:" +
|
||||
$"<color=#ECB85F>【{MaskUserName(data.userName)}】</color>捕获{data.fishName}," +
|
||||
$"获得<color=#ECB85F>{data.gold:N0}</color>金币</color>";
|
||||
UIManager.Instance.ShowBoardGongGao(text);
|
||||
|
||||
@@ -2026,6 +2026,92 @@ public class SitPosData : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
|
||||
tripleLockPositions.Clear();
|
||||
}
|
||||
|
||||
// ==================== 三发锁位(每个锁位独立维护) ====================
|
||||
// ⭐ index=0 是主锁位(monCotl_Lock + 主 lockFX),1..2 对应 lockFX_Triple[index-1]
|
||||
|
||||
/// <summary>取 index(1..2) 对应的额外锁定图标</summary>
|
||||
private GameObject GetTripleIcon(int index)
|
||||
{
|
||||
int iconIdx = index - 1;
|
||||
if (lockFX_Triple == null || iconIdx < 0 || iconIdx >= lockFX_Triple.Count) return null;
|
||||
return lockFX_Triple[iconIdx];
|
||||
}
|
||||
|
||||
/// <summary>替换单个三发锁位(锁位独立:某条鱼死了只补这一个锁位,其他锁位不动)</summary>
|
||||
public void SetTripleLockSlot(int index, MonsterContral monster, Transform hitPos)
|
||||
{
|
||||
if (index < 0) return;
|
||||
while (tripleLockTargets.Count <= index)
|
||||
{
|
||||
tripleLockTargets.Add(null);
|
||||
tripleLockPositions.Add(null);
|
||||
}
|
||||
tripleLockTargets[index] = monster;
|
||||
tripleLockPositions[index] = hitPos;
|
||||
|
||||
if (index == 0)
|
||||
{
|
||||
monCotl_Lock = monster;
|
||||
monCotl_Lock_Position = hitPos;
|
||||
isLock = monster != null;
|
||||
if (lockFX != null) lockFX.SetActive(isLock);
|
||||
}
|
||||
else
|
||||
{
|
||||
var icon = GetTripleIcon(index);
|
||||
if (icon != null) icon.SetActive(monster != null);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>清空单个三发锁位(该锁位暂时没鱼可补):保留槽位占位,只隐藏该锁位图标</summary>
|
||||
public void ClearTripleLockSlot(int index)
|
||||
{
|
||||
if (index < 0 || index >= tripleLockTargets.Count) return;
|
||||
tripleLockTargets[index] = null;
|
||||
if (index < tripleLockPositions.Count) tripleLockPositions[index] = null;
|
||||
|
||||
if (index == 0)
|
||||
{
|
||||
monCotl_Lock = null;
|
||||
monCotl_Lock_Position = null;
|
||||
isLock = false;
|
||||
if (lockFX != null) lockFX.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
var icon = GetTripleIcon(index);
|
||||
if (icon != null) icon.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 主锁位空缺时,把其他存活的锁位提升为主锁,避免主锁死掉导致整个三发模式中断。
|
||||
/// 提升后原锁位留空,下一帧会自动补新目标。成功返回 true。
|
||||
/// </summary>
|
||||
public bool PromoteTripleLockSlotToMain()
|
||||
{
|
||||
for (int i = 1; i < tripleLockTargets.Count; i++)
|
||||
{
|
||||
var mon = tripleLockTargets[i];
|
||||
if (mon == null || !mon.gameObject.activeInHierarchy) continue;
|
||||
|
||||
Transform pos = i < tripleLockPositions.Count ? tripleLockPositions[i] : null;
|
||||
tripleLockTargets[0] = mon;
|
||||
tripleLockPositions[0] = pos;
|
||||
tripleLockTargets[i] = null;
|
||||
tripleLockPositions[i] = null;
|
||||
var icon = GetTripleIcon(i);
|
||||
if (icon != null) icon.SetActive(false);
|
||||
|
||||
monCotl_Lock = mon;
|
||||
monCotl_Lock_Position = pos;
|
||||
isLock = true;
|
||||
if (lockFX != null) lockFX.SetActive(true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void ClearLock()
|
||||
{
|
||||
monCotl_Lock = null;
|
||||
|
||||
@@ -10965,6 +10965,12 @@ CircleCollider2D:
|
||||
m_Offset: {x: 0, y: 0}
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.5
|
||||
--- !u!4 &1420382728127733578 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 7170269253048201829, guid: 4c90120c907d1d44e82867f7e8d196e2,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 8086177351868656943}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1465252123815227804 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 7233414863879675059, guid: 4c90120c907d1d44e82867f7e8d196e2,
|
||||
@@ -11292,7 +11298,7 @@ MonoBehaviour:
|
||||
isyz: 0
|
||||
yzID:
|
||||
colliderList: []
|
||||
lockPoint: {fileID: 0}
|
||||
lockPoint: {fileID: 1420382728127733578}
|
||||
bingDongEffect:
|
||||
- {fileID: 0}
|
||||
needLockEvent: 0
|
||||
|
||||
@@ -853,7 +853,7 @@ MonoBehaviour:
|
||||
drawMoveLine: 0
|
||||
drawLineSegments: 60
|
||||
drawLineColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
|
||||
bossName: "\u66F2\u7EBF"
|
||||
bossName: "\u6FC0\u5149\u87F9"
|
||||
isToUI: 1
|
||||
tMP_CurrBossScore: {fileID: 0}
|
||||
currBossScoreValue: 0
|
||||
|
||||
@@ -409,3 +409,4 @@ MonoBehaviour:
|
||||
drawLineColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
|
||||
keepAliveTime: 1
|
||||
shandianStart: {fileID: 4782796877071577010}
|
||||
tsyPathName: "\u7535\u9CD7"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Assets.MyGame.Scripts.Net.APIResponses.Enum;
|
||||
using Assets.MyGame.Scripts.Net.WebResponses;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
@@ -26,7 +27,71 @@ public class ShanDianFishControl : MonsterContral
|
||||
private bool _recycleStarted;
|
||||
|
||||
public Transform shandianStart;
|
||||
public string tsyPathName;
|
||||
public override void Init(string pathId, float time, bool isyuzhen = false, string yzID = "")
|
||||
{
|
||||
// ⭐ 保存 pathId,用于房主把活鱼广播给新加入玩家
|
||||
lastMoveLineId = pathId;
|
||||
|
||||
// 根据是否为鱼阵选择路线 key
|
||||
string lineKey = tsyPathName + pathId;
|
||||
|
||||
if (!MonsterMoveLine.dic_BezierCurveDatas.TryGetValue(lineKey, out var bezierData))
|
||||
{
|
||||
Debug.LogError($"[MonsterContral] 找不到路线: {lineKey}");
|
||||
return;
|
||||
}
|
||||
|
||||
monsterData.moveLine.Init(bezierData, time);
|
||||
isyz = isyuzhen;
|
||||
this.yzID = yzID;
|
||||
|
||||
// ⭐ 缓存 yzID 前3字符前缀,避免 UpdateYZMovement 每帧每鱼 Substring 产生 GC
|
||||
SetYzPrefix(yzID);
|
||||
|
||||
//// ⭐ 预计算 700/701 直线阵的世界起点 + 方向系数
|
||||
//// 原逻辑每帧每鱼 CanvasToWorld(start) + 判断 goUp,现 Init 一次性算好
|
||||
CacheYzLineMoveData(bezierData);
|
||||
|
||||
fishenum = (FishTypeEnum)monsterData.fishTypeConfig.fishType;
|
||||
|
||||
// isMove=false 的鱼不需要移动路线,x/y 归位到 (0,0);z 不带——用预制体自带的深度
|
||||
if (!isMove)
|
||||
transform.position = new Vector3(0, 0, transform.position.z);
|
||||
|
||||
// ⭐ Boss朝向:不随路线切线旋转,按路线编号奇偶翻转X轴(单数左→右保持正向/双数右→左翻转)
|
||||
if (isMove && IsRouteFlipBoss)
|
||||
ApplyBossRouteFlip(pathId);
|
||||
|
||||
// ⭐ 创建视频启动逻辑由子类负责:
|
||||
// - MonsterControl_BossBase 在自己 Init 里启动 createVideo
|
||||
// - 普通鱼走父类 Init,但普通鱼一般不配 createVideo
|
||||
// OnMoveUpdata 会检测 createVideo.isPlaying,视频播放期间不移动
|
||||
|
||||
// ⭐ 标记已初始化,并启动 move 状态(OnEnable 里 isInitialized=false 时不会 ChangeState)
|
||||
isInitialized = true;
|
||||
ChangeState(CharacterStateType.move);
|
||||
|
||||
// 路径结束后自动销毁
|
||||
//StartCoroutine(yanchi(gameObject, time, isyuzhen));
|
||||
// ⭐ 使用 OnEnable 缓存的 _cachedChild,避免每帧 transform.GetChild(0) 调用开销
|
||||
// 兜底:缓存丢失时重新获取一次(理论上不会发生)
|
||||
Transform child = _cachedChild;
|
||||
if (child == null)
|
||||
{
|
||||
if (transform.childCount == 0) return;
|
||||
child = transform.GetChild(0);
|
||||
_cachedChild = child;
|
||||
}
|
||||
|
||||
Vector3 localPos = child.localPosition;
|
||||
// ⭐ x/y 归零摆正模型;z 深度只在显式配置 depthOffset(≠0)时才覆盖,
|
||||
// 否则保留预制体上设置的 3D 深度(3D Boss 用,之前被强制归零导致深度无效)
|
||||
localPos.x = 0f;
|
||||
if (depthOffset != 0)
|
||||
localPos.z = depthOffset;
|
||||
child.localPosition = localPos;
|
||||
}
|
||||
public override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
|
||||
@@ -3100,7 +3100,7 @@ MonoBehaviour:
|
||||
drawMoveLine: 0
|
||||
drawLineSegments: 60
|
||||
drawLineColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
|
||||
bossName: "\u66F2\u7EBF"
|
||||
bossName: "\u70B8\u5F39\u87F9"
|
||||
isToUI: 1
|
||||
tMP_CurrBossScore: {fileID: 0}
|
||||
currBossScoreValue: 0
|
||||
|
||||
@@ -9,17 +9,17 @@
|
||||
鱼阵9;-991.5191,-186.7481;-945.954,-186.7481;-903.64355,-188.37543;-862.96045,-190.00275;-808.87695,-187.33098;-770.86365,-189.7068;-728.09875,-189.7068;-684.1459,-192.08264;-633.06555,-194.45847;-574.8577,-198.02222;-510.71033,-199.21013;-444.34625,-208.99576;-412.15942,-191.59747;-365.7847,-163.57268;-355.09344,-117.243996;-351.52972,-61.411995;-382.4155,-10.33165;-437.05957,16.990387;-508.33447,20.554138;-564.1665,-18.647064;-587.9248,-55.47242;-592.67645,-111.30442;-573.6698,-158.82101;-530.90485,-198.02222;-477.4487,-206.33762;-414.76917,-206.38602;-367.7938,-200.2966;-303.42014,-202.90636;-259.0545,-198.5568;-209.46939,-194.20721;-162.49403,-193.3373;-112.08925,-187.33617;-28.189156,-180.06653;7.6845894,-167.51071;42.66149,-141.50224;61.49521,-100.247444;65.08258,-51.817886;50.733086,-7.872551;14.859339,25.310669;-37.15759,41.45385;-90.968216,25.310669;-130.42934,0.19904327;-150.1599,-39.262074;-150.64322,-86.23916;-137.60408,-123.56538;-107.111404,-160.33597;-67.65027,-179.16968;-13.562519,-181.3389;51.62993,-171.99493;123.37741,-170.20125;185.25963,-171.99493;239.96709,-170.20125;300.05563,-169.3044;359.93073,-166.14081;459.98776,-171.24576;500.4113,-142.89761;534.70355,-91.87169;529.0021,-46.26018;515.15576,-11.237064;480.9471,23.786057;430.31058,31.814945;381.7793,18.873272;344.03278,-23.18716;331.0911,-65.24759;340.79736,-119.17122;377.4654,-149.36845;427.07516,-167.70248;475.97986,-164.50256;498.34207,-165.50386;535.7237,-164.50256;564.7612,-163.83505;603.8117,-163.16751;635.853,-163.50128;670.5645,-164.50256;702.6059,-164.50256;743.32513,-164.83633;787.7158,-165.1701;828.43506,-165.1701;876.6498,-162.33824;933.6062,-163.96556;985.68054,-165.59288;1029.6184,-163.96556
|
||||
鱼阵10;-232.1092,-74.58392;-241.0712,-37.45563;-271.79807,-4.1681976;-308.28622,14.395943;-349.25537,20.79737;-403.02734,11.195229;-443.99652,-17.611198;-471.29004,-56.46317;-479.3141,-107.47302;-464.98547,-155.044;-440.9134,-192.29839;-400.7933,-215.22415;-345.1983,-220.9556;-291.32272,-211.7853;-252.92204,-181.40865;-236.13043,-144.5199;-231.32094,-107.96778;-213.52583,-79.5918;-193.80693,-56.02531;-149.07869,-56.02531;-103.86953,-59.391945;-56.73655,-62.277634;-10.084511,-62.758583;34.16278,-62.758583;88.48624,-64.6382;139.88074,-63.52093;194.62704,-61.28639;246.02155,-63.52093;300.76785,-66.87275;353.27963,-67.99002;412.49503,-67.99001;476.1795,-70.224556;533.1604,-71.34183;589.0239,-72.45911;651.5912,-72.45911;726.44836,-75.81091;781.1947,-74.69365;829.2374,-75.81091;874.6974,-75.73594;926.5516,-77.30728;979.9772,-77.30728;1030.26,-80.44996
|
||||
鱼阵11;232.1092,74.58392;241.0712,37.45563;271.79807,4.1681976;308.28622,-14.395943;349.25537,-20.79737;403.02734,-11.195229;443.99652,17.611198;471.29004,56.46317;479.3141,107.47302;464.98547,155.044;440.9134,192.29839;400.7933,215.22415;345.1983,220.9556;291.32272,211.7853;252.92204,181.40865;236.13043,144.5199;231.32094,107.96778;213.52583,79.5918;193.80693,56.02531;149.07869,56.02531;103.86953,59.391945;56.73655,62.277634;10.084511,62.758583;-34.16278,62.758583;-88.48624,64.6382;-139.88074,63.52093;-194.62704,61.28639;-246.02155,63.52093;-300.76785,66.87275;-353.27963,67.99002;-412.49503,67.99001;-476.1795,70.224556;-533.1604,71.34183;-589.0239,72.45911;-651.5912,72.45911;-726.44836,75.81091;-781.1947,74.69365;-829.2374,75.81091;-853.8174,75.81091;-900.91736,75.112755;-949.6289,76.6841;-999.9118,73.54141
|
||||
鱼阵12;-278.6665,529.23016;-310.0933,500.94604;-344.66278,471.09058;-385.51764,441.2351;-442.37305,396.70645;-471.5633,345.0622;-476.05408,291.17258;-455.84546,237.28296;-442.37305,201.35654;-434.414,173.54659;-421.7185,127.85588;-426.50818,83.152504;-439.28055,44.835323;-473.9108,5.5151215;-502.19318,-20.67228;-538.8556,-47.907173;-566.09045,-79.33204;-573.4229,-114.94691;-573.4229,-156.84674;-559.80493,-205.12128;-546.27295,-242.81755;-536.60724,-279.54724;-534.6741,-330.77554;-548.20605,-362.6724;-577.20325,-394.56924;-619.40125,-437.74707;-650.5359,-471.27667;-691.25037,-514.38617;-734.35986,-538.3359
|
||||
鱼阵13;-311.8423,-559.4156;-290.5769,-523.42804;-266.03995,-487.4405;-239.86719,-443.27396;-216.02615,-404.95468;-191.81012,-376.33575;-169.79555,-343.31387;-160.98972,-314.69495;-160.98972,-270.6658;-178.60138,-231.03958;-180.80283,-180.40605;-178.60138,-153.98857;-183.00429,-129.77254;-176.39992,-87.944855;-158.78827,-48.318626;-145.57951,-21.901138;-116.96058,6.717804;-88.34163,26.530918;-57.521233,61.754234;-42.11103,85.97026;-31.103745,116.790665;-37.708115,152.01398;-50.916862,178.43146;-68.52852,196.04312;-105.95329,224.66206;-132.37077,235.66936;-152.1839,255.48247;-169.79555,273.09412;-174.19846,299.5116;-163.19118,330.332;-138.97514,363.35388;-112.55766,383.167;-77.33435,407.383;-43.20797,433.0592;-1.4042549,465.77515;47.66967,509.39642
|
||||
鱼阵12;-514.0376,-560.3905;-342.4539,-320.32922;-447.82025,-56.9133;-269.70093,229.08112;-377.576,434.7964;-289.7707,587.8285
|
||||
鱼阵13;-111.65138,562.7413;-217.01773,314.3777;-119.17755,126.223465;-239.59624,-124.64882;-176.87817,-347.92517;-222.03519,-538.58813
|
||||
鱼阵14;280.31644,565.74054;278.4989,522.11926;274.86377,485.76822;274.86377,440.3294;278.2854,385.7688;279.31238,350.85095;279.31238,313.8791;279.31238,282.0422;279.31238,245.07036;279.31238,207.0715;278.0053,169.14143;278.0053,139.91626;279.44263,110.212;279.92172,82.903244;294.77386,57.510887;312.50058,38.346848;335.97653,27.327522;361.3689,25.411118;388.19855,25.411118;413.5909,27.806625;439.94147,32.11853;464.85474,46.012463;478.26956,69.48841;484.49786,102.54639;485.93518,133.68796;485.93518,161.95493;485.93518,189.74278;486.41428,218.00975;485.45605,247.23492;484.97696,274.06458;484.01874,303.76886;485.45605,331.0776;485.54602,358.37903;485.54602,394.8239;480.0508,418.95428;478.4297,469.41025;483.88232,523.9368;483.88232,571.19324
|
||||
鱼阵15;1005.8704,-35.372574;978.73755,-34.52467;951.60474,-36.220474;925.31976,-37.91628;881.2289,-37.91628;845.617,-40.459984;824.4195,-38.76418;803.9944,-37.42885;789.3941,-38.184036;757.6762,-37.42885;773.0317,-37.93231;738.293,-37.17712;719.1616,-37.17712;700.5337,-37.17712;683.91956,-37.17712;664.1906,-36.42115;644.3211,-37.61811;628.7606,-37.37872;610.8062,-37.139328;586.9379,-37.95098;565.55255,-37.49597;543.7121,-38.40599;519.14166,-37.040966;495.02625,-36.585957;469.09076,-39.771015;448.30966,-44.278168;427.562,-61.11117;415.81805,-79.51004;409.9395,-98.012085;407.20944,-118.942474;409.02948,-146.24298;419.03967,-166.26334;430.86987,-184.00867;453.6203,-197.20392;477.73575,-204.02904;502.7612,-207.2141;525.9666,-201.754;552.048,-188.72885;568.881,-169.54704;577.88464,-149.97379;580.23346,-132.35785;579.842,-111.61019;577.88464,-92.03693;564.9663,-70.11487;554.3967,-57.587982;537.9552,-46.62696;520.7307,-38.014725;502.33185,-36.840324;484.7159,-37.23179;461.61948,-41.146446;444.39502,-47.801353;433.82544,-56.805054;416.99243,-75.20392;407.05777,-111.15677;408.0689,-134.41275;407.05777,-175.36351;408.0689,-196.59723;409.08002,-219.85321;409.58563,-236.53683;408.57452,-257.26498;408.57452,-280.0154;408.06894,-302.26025;407.0578,-328.04407;407.0578,-347.25555;407.0578,-367.47815;406.05292,-387.85052;405.35944,-403.10764;405.1,-421.18533;404.47867,-446.0389;401.99332,-473.3778;401.37198,-504.44473
|
||||
鱼阵155;398.26526,-501.9593;401.9933,-479.5911;402.61462,-451.63086;403.23596,-423.6706;405.35944,-403.10764;406.05292,-387.85052;407.0578,-367.47815;407.0578,-347.25555;407.0578,-328.04407;408.06894,-302.26025;408.57452,-280.0154;408.57452,-257.26498;409.58563,-236.53683;409.08002,-219.85321;408.0689,-196.59723;407.05777,-175.36351;408.0689,-134.41275;407.05777,-111.15677;416.99243,-75.20392;433.82544,-56.805054;444.39502,-47.801353;461.61948,-41.146446;484.7159,-37.23179;502.33185,-36.840324;520.7307,-38.014725;537.9552,-46.62696;554.3967,-57.587982;564.9663,-70.11487;577.88464,-92.03693;579.842,-111.61019;580.23346,-132.35785;577.88464,-149.97379;568.881,-169.54704;552.048,-188.72885;525.9666,-201.754;502.7612,-207.2141;477.73575,-204.02904;453.6203,-197.20392;430.86987,-184.00867;419.03967,-166.26334;409.02948,-146.24298;407.20944,-118.942474;409.9395,-98.012085;415.81805,-79.51004;427.562,-61.11117;448.30966,-44.278168;469.09076,-39.771015;495.02625,-36.585957;519.14166,-37.040966;543.7121,-38.40599;565.55255,-37.49597;586.9379,-37.95098;610.8062,-37.139328;628.7606,-37.37872;644.3211,-37.61811;664.1906,-36.42115;683.91956,-37.17712;700.5337,-37.17712;719.1616,-37.17712;738.293,-37.17712;773.0317,-37.93231;757.6762,-37.42885;789.3941,-38.184036;803.9944,-37.42885;1005.93445,-35.955177;966.79016,-35.955177;936.34454,-38.440536;898.4429,-38.440536;862.4052,-39.061874;822.0182,-38.440536
|
||||
鱼阵16;-989.006,37.93033;-953.36816,37.93033;-908.4909,38.590286;-868.23334,35.950447;-842.49493,35.29049;-822.69617,35.950447;-803.9944,37.42885;-789.3941,38.184036;-757.6762,37.42885;-773.0317,37.93231;-738.293,37.17712;-719.1616,37.17712;-700.5337,37.17712;-683.91956,37.17712;-664.1906,36.42115;-644.3211,37.61811;-628.7606,37.37872;-610.8062,37.139328;-586.9379,37.95098;-565.55255,37.49597;-543.7121,38.40599;-519.14166,37.040966;-495.02625,36.585957;-469.09076,39.771015;-448.30966,44.278168;-427.562,61.11117;-415.81805,79.51004;-409.9395,98.012085;-407.20944,118.942474;-409.02948,146.24298;-419.03967,166.26334;-430.86987,184.00867;-453.6203,197.20392;-477.73575,204.02904;-502.7612,207.2141;-525.9666,201.754;-552.048,188.72885;-568.881,169.54704;-577.88464,149.97379;-580.23346,132.35785;-579.842,111.61019;-577.88464,92.03693;-564.9663,70.11487;-554.3967,57.587982;-537.9552,46.62696;-520.7307,38.014725;-502.33185,36.840324;-484.7159,37.23179;-461.61948,41.146446;-444.39502,47.801353;-433.82544,56.805054;-416.99243,75.20392;-407.05777,111.15677;-408.0689,134.41275;-407.05777,175.36351;-408.0689,196.59723;-409.08002,219.85321;-409.58563,236.53683;-408.57452,257.26498;-408.57452,280.0154;-408.06894,302.26025;-407.0578,328.04407;-407.0578,347.25555;-407.0578,367.47815;-406.05292,387.85052;-405.35944,403.10764;-405.60162,422.02682;-406.26157,449.74512;-405.60162,480.10327;-404.94165,513.10126;-408.24146,545.4393
|
||||
鱼阵166;-405.3282,535.386;-405.3282,504.17667;-404.02777,469.71637;-405.3282,436.5565;-405.3282,408.59814;-406.05292,387.85052;-407.0578,367.47815;-407.0578,347.25555;-407.0578,328.04407;-408.06894,302.26025;-408.57452,280.0154;-408.57452,257.26498;-409.58563,236.53683;-409.08002,219.85321;-408.0689,196.59723;-407.05777,175.36351;-408.0689,134.41275;-407.05777,111.15677;-416.99243,75.20392;-433.82544,56.805054;-444.39502,47.801353;-461.61948,41.146446;-484.7159,37.23179;-502.33185,36.840324;-520.7307,38.014725;-537.9552,46.62696;-554.3967,57.587982;-564.9663,70.11487;-577.88464,92.03693;-579.842,111.61019;-580.23346,132.35785;-577.88464,149.97379;-568.881,169.54704;-552.048,188.72885;-525.9666,201.754;-502.7612,207.2141;-477.73575,204.02904;-453.6203,197.20392;-430.86987,184.00867;-419.03967,166.26334;-409.02948,146.24298;-407.20944,118.942474;-409.9395,98.012085;-415.81805,79.51004;-427.562,61.11117;-448.30966,44.278168;-469.09076,39.771015;-495.02625,36.585957;-519.14166,37.040966;-543.7121,38.40599;-565.55255,37.49597;-586.9379,37.95098;-610.8062,37.139328;-628.7606,37.37872;-644.3211,37.61811;-664.1906,36.42115;-683.91956,37.17712;-700.5337,37.17712;-719.1616,37.17712;-738.293,37.17712;-773.0317,37.93231;-757.6762,37.42885;-789.3941,38.184036;-803.9944,37.42885;-820.7516,37.241558;-849.4108,35.386734;-879.97,36.03693;-914.43024,36.687122;-960.594,34.73654;-990.5029,37.33732
|
||||
鱼阵17;485.50128,565.652;504.25122,487.97375;517.644,447.79535;534.18567,414.03436;545.0719,385.73016;551.60364,357.42596;566.04974,336.53662;582.2606,306.81665;594.8691,278.8979;610.1794,244.6749;620.08606,213.15372;629.9927,185.23495;627.2909,144.70773;601.17334,123.993805;569.65216,99.67746;543.5346,77.16234;516.5165,60.95144;504.8086,38.43631;515.53424,5.2777405;536.8213,-17.646759;554.01465,-36.477585;569.65216,-48.02179;587.66425,-70.53693;602.97485,-98.45566;603.1386,-130.63177;594.9513,-157.64993;579.3954,-180.57443;550.73975,-195.3116;531.9089,-217.41737;521.9204,-245.2543;528.2246,-274.97427;541.7337,-298.39;560.64636,-318.2033;576.8574,-325.40814;606.5774,-322.70633;637.5251,-321.39636;666.1807,-331.22113;659.63086,-355.78308;628.51904,-354.14563;595.7698,-357.42056;572.8453,-360.6955;548.2833,-372.97647;542.5522,-399.1759;540.3173,-422.19095;538.50745,-445.71924;539.1107,-475.28043;539.1107,-504.23834
|
||||
鱼阵17;643.92285,560.1147;522.9208,394.90024;667.1925,185.47351;471.72757,-19.299294;629.9612,-291.55405;469.40067,-540.5392
|
||||
鱼阵18;-1000.9641,-128.48486;-908.4238,-132.50835;-846.0597,-128.48486;-798.59485,-130.52393;-763.16394,-127.30294;-710.06415,-128.99052;-666.5343,-127.30294;-618.2194,-127.30294;-553.7997,-127.30294;-505.4848,-130.52393;-447.1065,-141.01144;-391.50974,-147.02191;-344.92865,-168.05852;-295.34238,-208.62912;-235.23776,-228.16312;-187.15408,-195.10559;-146.58347,-147.02191;-104.510254,-115.466995;-60.934357,-86.9173;-12.85067,-68.88592;32.227783,-46.346687;80.735275,-27.45227;125.82913,-4.905342;177.36496,4.7576256;245.00574,7.978615;290.0996,14.420593;328.75146,14.420593;379.33188,22.773605;428.91818,31.789291;483.35895,43.4095;534.8948,49.85148;573.1692,55.83113;618.6405,56.293457;664.82874,37.79976;690.37317,-7.278702;692.72327,-59.662163;667.834,-104.94868;621.8615,-133.74492;579.98865,-146.62888;540.1117,-157.5402;486.57996,-172.39679;431.9234,-178.57681;367.40332,-185.28075;305.70374,-184.58728;245.00574,-198.1647;186.99713,-217.6448;134.40561,-216.1422;83.95627,-211.04866;38.862415,-217.49065;-6.2314377,-214.26965;-57.767273,-227.15361;-89.97716,-243.25856;-138.292,-269.0265;-202.7118,-281.91043;-280.01556,-294.79437;-337.99335,-285.1314;-387.00183,-271.73895;-437.84406,-285.1314;-479.71692,-314.1203;-518.3688,-355.99316;-557.0206,-401.08704;-579.56757,-442.9599;-592.5797,-504.6813;-600.6267,-565.0337
|
||||
鱼阵19;1020.84033,129.0186;958.4762,133.04208;894.10034,133.04208;841.795,127.00685;798.59485,130.52393;763.16394,127.30294;710.06415,128.99052;666.5343,127.30294;618.2194,127.30294;553.7997,127.30294;505.4848,130.52393;447.1065,141.01144;391.50974,147.02191;344.92865,168.05852;295.34238,208.62912;235.23776,228.16312;187.15408,195.10559;146.58347,147.02191;104.510254,115.466995;60.934357,86.9173;12.85067,68.88592;-32.227783,46.346687;-80.735275,27.45227;-125.82913,4.905342;-177.36496,-4.7576256;-245.00574,-7.978615;-290.0996,-14.420593;-328.75146,-14.420593;-379.33188,-22.773605;-428.91818,-31.789291;-483.35895,-43.4095;-534.8948,-49.85148;-573.1692,-55.83113;-618.6405,-56.293457;-664.82874,-37.79976;-690.37317,7.278702;-692.72327,59.662163;-667.834,104.94868;-621.8615,133.74492;-579.98865,146.62888;-540.1117,157.5402;-486.57996,172.39679;-431.9234,178.57681;-367.40332,185.28075;-305.70374,184.58728;-245.00574,198.1647;-186.99713,217.6448;-134.40561,216.1422;-83.95627,211.04866;-38.862415,217.49065;6.2314377,214.26965;57.767273,227.15361;89.97716,243.25856;138.292,269.0265;202.7118,281.91043;280.01556,294.79437;337.99335,285.1314;387.00183,271.73895;437.84406,285.1314;479.71692,314.1203;518.3688,355.99316;557.0206,401.08704;579.56757,442.9599;604.409,509.23853;612.456,579.64966
|
||||
鱼阵20;508.76935,-523.9403;491.60437,-479.59753;477.30023,-438.11554;463.0445,-403.32068;450.1474,-366.24158;448.53528,-372.69012;446.92313,-346.89597;446.92313,-324.32608;459.82022,-303.36835;475.94156,-287.24698;500.1236,-266.2892;522.6935,-235.65866;532.3663,-209.8645;535.5906,-180.84607;524.3056,-145.3791;500.1236,-124.42134;479.16583,-109.91213;456.59595,-93.79078;429.18964,-77.66943;413.0683,-63.160217;396.94696,-42.20246;385.662,-16.408302;388.88626,19.05867;406.61975,43.240692;422.74112,67.422714;445.311,83.54407;477.5537,96.44115;503.34784,119.01105;517.85706,146.41733;532.3663,177.04788;540.13354,206.30687;539.0324,231.6324;540.13354,254.7557;519.21246,269.07013;505.99915,275.6768;478.47137,285.5868;460.85364,287.789;434.427,297.69897;425.61813,308.71008;414.60703,331.83337;416.80923,347.2489;419.01147,362.66446;424.517,383.58554;435.5281,399.0011;446.5392,410.01218;470.14813,438.72772;503.0476,485.93134;527.3646,543.1479
|
||||
鱼阵20;476.26135,-536.58435;476.26135,-428.77032;480.09064,-322.9043;426.0891,-227.60748;372.08762,-75.13263;482.30536,73.29963;530.5195,203.4776;510.02844,348.11978;449.76086,459.01212;368.44733,556.354
|
||||
鱼阵21;-546.9665,555.73804;-188.189,137.15216;-192.014,-176.49893;-563.01697,-599.3468
|
||||
鱼阵22;537.2172,590.4077;192.014,176.49893;188.189,-137.15216;531.4418,-535.8163
|
||||
鱼阵23;1033.9109,165.90794;944.3905,157.24467;875.0845,160.13243;775.4109,161.8459;706.51416,164.44577;642.8172,165.74571;584.32,165.74571;520.62305,167.04565;459.5259,165.74571;391.92914,168.3456;316.5327,168.3456;242.43623,173.54535;178.73926,176.14522;91.6434,180.04503;11.047241,178.7451;-63.049255,178.7451;-143.64542,177.44516;-225.54152,178.7451;-312.6374,176.14522;-394.5335,172.2454;-484.22925,176.14522;-566.12537,170.94547;-649.3214,169.64554;-737.71716,156.64615;-843.0122,124.1477;-895.00977,94.249115;-919.70856,40.95165;-927.5082,-24.045263;-932.7079,-92.941986;-878.11053,-147.5394;-833.9126,-186.53754;-772.81555,-225.53568;-692.21936,-237.23514;-612.9231,-245.03476;-551.82605,-246.33469;-481.62936,-242.43488;-390.6337,-241.13495;-307.43762,-234.63525;-221.64172,-228.13556;-146.2453,-224.23575;-65.64914,-219.03601;16.246979,-209.93643;95.54315,-209.93643;174.83939,-208.6365;256.73547,-208.6365;342.5314,-208.6365;428.32733,-207.33655;515.4232,-203.43674;599.91907,-207.33655;671.4157,-204.73668;739.01245,-206.03662;788.41016,-204.73668;835.2079,-203.43674;915.51306,-212.38782;996.3701,-221.05109;1065.6761,-226.82657
|
||||
|
||||
@@ -3613,12 +3613,47 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
}
|
||||
private void CheckLockTargetValid()
|
||||
{
|
||||
// ⭐⭐⭐ 三发模式:每个锁位独立维护 —— 鱼死了 或 路径离场时,只补那一个锁位,其他锁位不动
|
||||
// (Count 由 SetTripleLockTargets 建立;HideTripleLockIcons 才清成 0)
|
||||
if (currSitData.tripleLockTargets.Count > 0)
|
||||
{
|
||||
// ⭐ 补齐到3个锁位(三发=最多3个目标):某位暂时没鱼可补就留空占位,下一帧继续尝试
|
||||
while (currSitData.tripleLockTargets.Count < 3)
|
||||
{
|
||||
currSitData.tripleLockTargets.Add(null);
|
||||
currSitData.tripleLockPositions.Add(null);
|
||||
}
|
||||
|
||||
for (int i = currSitData.tripleLockTargets.Count - 1; i >= 0; i--)
|
||||
{
|
||||
var t = currSitData.tripleLockTargets[i];
|
||||
|
||||
// ⭐ 鱼死了(被回收/销毁) → 补这一个锁位
|
||||
if (t == null || !t.gameObject.activeInHierarchy)
|
||||
{
|
||||
RefillTripleLockSlot(i);
|
||||
continue;
|
||||
}
|
||||
|
||||
// ⭐ 主锁位是玩家手动锁的 → 离场前一直跟,不自动更换
|
||||
if (i == 0 && currSitData.isManualLock) continue;
|
||||
|
||||
// ⭐ 自动锁定的锁位:路径离场(超出 0.1~0.9) 或 被 SuoDing 取消勾选
|
||||
// → 只补这一个锁位,其他锁位不动
|
||||
if (!IsFishPathLockable(t) || !IsFishAllowedBySuoDing(t))
|
||||
RefillTripleLockSlot(i);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!currSitData.isLock) return;
|
||||
|
||||
var monster = currSitData.monCotl_Lock;
|
||||
|
||||
// ⭐ 目标无效判定:被回收/销毁
|
||||
// 路径进度检查仅对自动锁定生效;手动锁定不检查(玩家自己锁的鱼离场前一直跟)
|
||||
// ⭐ 目标无效判定:
|
||||
// ① 被回收/销毁(死了) → 更换目标
|
||||
// ② 自动锁定 且 路径离场(超出 0.1~0.9) → 更换目标
|
||||
// ③ 手动锁定 → 不检查路径,玩家自己点的鱼离场前一直跟(死了才换)
|
||||
bool mainInvalid = monster == null
|
||||
|| !monster.gameObject.activeInHierarchy
|
||||
|| (!currSitData.isManualLock && !IsFishPathLockable(monster));
|
||||
@@ -3634,28 +3669,89 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
SyncTurretState(TurretState.Idle);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// ⭐ 检查三发锁定目标:移除已死亡或已离场的额外目标
|
||||
if (currSitData.tripleLockTargets.Count > 0)
|
||||
/// <summary>
|
||||
/// ⭐ 只补指定索引的三发锁位(锁位独立):该锁位的鱼死了或路径离场,只补这一个,其他锁位不动。
|
||||
/// slotIndex=0 是主锁位(monCotl_Lock/主 lockFX),1..2 用 lockFX_Triple。
|
||||
/// 找不到新目标时:主锁位尝试把其他存活锁位提升为主锁,其余锁位只隐藏图标保留占位。
|
||||
/// </summary>
|
||||
private void RefillTripleLockSlot(int slotIndex)
|
||||
{
|
||||
MonsterContral target = FindOneLockableTargetExceptSlots(slotIndex);
|
||||
if (target != null)
|
||||
{
|
||||
bool changed = false;
|
||||
for (int i = currSitData.tripleLockTargets.Count - 1; i >= 1; i--)
|
||||
Transform lockTr = ResolveLockTransform(target, out _);
|
||||
if (lockTr != null)
|
||||
{
|
||||
var t = currSitData.tripleLockTargets[i];
|
||||
// 失效判定:被回收/销毁 OR 路径离场
|
||||
if (t == null || !t.gameObject.activeInHierarchy || !IsFishPathLockable(t))
|
||||
{
|
||||
currSitData.tripleLockTargets.RemoveAt(i);
|
||||
currSitData.tripleLockPositions.RemoveAt(i);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
// 有目标失效 → 清空三发列表,让 RefreshTripleLockIcons 重新找满3个
|
||||
if (changed)
|
||||
{
|
||||
currSitData.HideTripleLockIcons();
|
||||
currSitData.SetTripleLockSlot(slotIndex, target, lockTr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 主锁位空缺且没新目标 → 把其他存活锁位提升为主锁,保持三发模式不中断
|
||||
if (slotIndex == 0 && currSitData.PromoteTripleLockSlotToMain()) return;
|
||||
|
||||
currSitData.ClearTripleLockSlot(slotIndex);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 找一个可锁定的鱼(排除当前三发锁位里其他锁位已占用的鱼),优先级分层同 FindAutoLockTarget。
|
||||
/// slotIndex 是要重填的锁位(该锁位自身的旧目标不算占用)。
|
||||
/// </summary>
|
||||
private MonsterContral FindOneLockableTargetExceptSlots(int slotIndex)
|
||||
{
|
||||
if (CreateFishManager.Instance == null ||
|
||||
CreateFishManager.Instance.fishDatas_hashCodekey == null)
|
||||
return null;
|
||||
|
||||
// 其他锁位已占用的鱼(避免同一条鱼被锁两次)
|
||||
var used = new HashSet<string>();
|
||||
for (int i = 0; i < currSitData.tripleLockTargets.Count; i++)
|
||||
{
|
||||
if (i == slotIndex) continue;
|
||||
var t = currSitData.tripleLockTargets[i];
|
||||
if (t != null) used.Add(t.guid);
|
||||
}
|
||||
|
||||
Vector3 origin = currSitData.turretWorldPos;
|
||||
MonsterContral best = null;
|
||||
int bestPri = -1;
|
||||
float bestSqr = float.MaxValue;
|
||||
var fallback = new List<MonsterContral>(); // 黄金鱼/普通鱼层,同层随机
|
||||
|
||||
foreach (var kv in CreateFishManager.Instance.fishDatas_hashCodekey)
|
||||
{
|
||||
MonsterContral m = kv.Value;
|
||||
if (m == null || !m.gameObject.activeInHierarchy) continue;
|
||||
if (used.Contains(m.guid)) continue;
|
||||
// ⭐ 单独锁定白名单(SuoDing)
|
||||
if (!IsFishAllowedBySuoDing(m)) continue;
|
||||
// ⭐ 路径进度过滤:刚出生(< 0.1)或即将离场(> 0.9)的鱼不作为目标
|
||||
if (!IsFishPathLockable(m)) continue;
|
||||
// ⭐ 可锁定过滤:出场效果期间/needLockEvent 鱼未就绪 → 跳过
|
||||
if (!IsMonsterLockable(m)) continue;
|
||||
|
||||
int pri = GetFishLockPriority(m);
|
||||
if (pri >= 3)
|
||||
{
|
||||
float sqr = (m.transform.position - origin).sqrMagnitude;
|
||||
if (pri > bestPri || (pri == bestPri && sqr < bestSqr))
|
||||
{
|
||||
bestPri = pri;
|
||||
bestSqr = sqr;
|
||||
best = m;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fallback.Add(m);
|
||||
}
|
||||
}
|
||||
|
||||
if (best != null) return best;
|
||||
if (fallback.Count > 0) return fallback[Random.Range(0, fallback.Count)];
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -3703,32 +3799,48 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
// ⭐ 特殊鱼爆奖(钻头/激光)期间禁用自动锁定:锁定目标让位给炮台瞄准方向
|
||||
if (currSitData != null && currSitData.isDrillActive) return;
|
||||
|
||||
// 自动锁定必须在锁定开关开启时才工作
|
||||
// ⭐ 自动锁定必须在锁定开关开启时才工作
|
||||
if (!toggle_Lock.isOn) return;
|
||||
|
||||
// ⭐ 前提条件:玩家必须先手动锁定一条鱼来激活自动锁定
|
||||
// 激活后,当锁定的鱼死亡,自动转换到下一个目标
|
||||
if (!_autoLockActivated) return;
|
||||
|
||||
// 已经有锁定目标并且还活着
|
||||
// ⭐ 手动锁定:玩家自己选的鱼离场前一直跟,死亡后才自动转换(不自动升级)
|
||||
// ⭐ 自动锁定:目标活着时也要做"优先级升级"检查 —— 场上出现更高优先级的鱼
|
||||
// (例如Boss刚游过 0.1 路径进度变得可锁定)时立即切换过去。
|
||||
// 否则会一直锁着先选中的普通鱼直到它死,表现为"屏幕上还有大鱼却锁着普通鱼"
|
||||
// ⭐⭐⭐ 三发模式:每个锁位由 CheckLockTargetValid 逐位独立维护(死一条只补那一条),
|
||||
// 这里不再插手,否则"死一条鱼会导致三个锁定目标全部重新寻找"
|
||||
if (currSitData.tripleLockTargets.Count > 0) return;
|
||||
|
||||
/* ==================== 立即升级版本(2026-09-28 注释保留,方便回退) ====================
|
||||
// 目标活着时也做"优先级升级":场上出现更高优先级的鱼 → 立即抢过来锁定
|
||||
if (currSitData.isLock &&
|
||||
currSitData.monCotl_Lock != null &&
|
||||
currSitData.monCotl_Lock.gameObject.activeInHierarchy)
|
||||
{
|
||||
// 手动锁定:死了才转换(玩家自己点的鱼,不受白名单限制)
|
||||
if (currSitData.isManualLock) return;
|
||||
|
||||
if (IsFishPathLockable(currSitData.monCotl_Lock)
|
||||
&& IsFishAllowedBySuoDing(currSitData.monCotl_Lock))
|
||||
{
|
||||
// 当前目标仍有效且在白名单内 → 没有更高优先级目标就保持锁定,有就落到下面切换
|
||||
if (!HasHigherPriorityTarget(currSitData.monCotl_Lock)) return;
|
||||
}
|
||||
// 当前目标离场(超出 0.1~0.9) 或 被取消勾选(不在白名单) → 落到下面重新找目标
|
||||
}
|
||||
==================== 立即升级版本结束 ==================== */
|
||||
|
||||
// ⭐⭐⭐ 换目标规则:
|
||||
// ① 手动锁定 → 玩家自己点的鱼,离场前一直跟,死了才换
|
||||
// ② 自动锁定,路径仍在可锁范围(0.1~0.9) → 保持锁定
|
||||
// ⭐ 此时场上就算出现更高级的鱼也不立刻抢,等当前这条被打死后再换
|
||||
// (那时 FindAutoLockTarget 会按优先级优先选高级鱼)
|
||||
// ③ 自动锁定,路径离场(超出 0.1~0.9) 或 被 SuoDing 取消勾选 → 落到下面重新找目标
|
||||
if (currSitData.isLock &&
|
||||
currSitData.monCotl_Lock != null &&
|
||||
currSitData.monCotl_Lock.gameObject.activeInHierarchy)
|
||||
{
|
||||
if (currSitData.isManualLock) return;
|
||||
if (IsFishPathLockable(currSitData.monCotl_Lock)
|
||||
&& IsFishAllowedBySuoDing(currSitData.monCotl_Lock))
|
||||
return;
|
||||
// 路径离场 / 不在白名单 → 重新找目标
|
||||
}
|
||||
|
||||
// 当前锁定目标已死亡/失效 → 自动找下一个目标
|
||||
|
||||
Reference in New Issue
Block a user