1
This commit is contained in:
@@ -1150,7 +1150,10 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
|
||||
// 处理选中的最佳命中
|
||||
MonsterContral monster = bestHit.collider.GetComponentInParent<MonsterContral>();
|
||||
currSitData.SetLockTarget(monster, bestHit.collider.transform);
|
||||
Transform lockTr = (monster.colliderList == null || monster.colliderList.Count == 0)
|
||||
? (monster.lockPoint==null ? bestHit.collider.transform : monster.lockPoint)
|
||||
: bestHit.collider.transform;
|
||||
currSitData.SetLockTarget(monster, lockTr);
|
||||
SyncLock(new List<string> { monster?.guid }, monster.colliderList.IndexOf(bestHit.collider.transform));
|
||||
}
|
||||
private void UpdateLockFX()
|
||||
@@ -1163,7 +1166,7 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
|
||||
if (!sit.monCotl_Lock_Position.gameObject.activeInHierarchy)
|
||||
{
|
||||
if (sit.monCotl_Lock.colliderList != null)
|
||||
if (sit.monCotl_Lock.colliderList != null && sit.monCotl_Lock.colliderList.Count > 0)
|
||||
{
|
||||
foreach (Transform t in sit.monCotl_Lock.colliderList)
|
||||
{
|
||||
@@ -1175,6 +1178,12 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 无 colliderList: 用 lockPoint 兜底
|
||||
sit.monCotl_Lock_Position = sit.monCotl_Lock.lockPoint ?? sit.monCotl_Lock.transform;
|
||||
pos = sit.monCotl_Lock_Position.position;
|
||||
}
|
||||
if (!sit.monCotl_Lock_Position.gameObject.activeInHierarchy)
|
||||
{
|
||||
if (sit.lockFX.activeSelf)
|
||||
@@ -1489,10 +1498,12 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
|
||||
MonsterContral monster = CreateFishManager.Instance.fishDatas_hashCodekey[data.targetGuid[0]];
|
||||
Transform hitPos;
|
||||
|
||||
|
||||
if (monster.colliderList != null && monster.colliderList.Count > 0 && data.colliderIndex != -1)
|
||||
hitPos = monster.colliderList[data.colliderIndex];
|
||||
else
|
||||
hitPos = monster.transform;
|
||||
hitPos = monster.lockPoint ?? monster.transform;
|
||||
|
||||
list_Sits[sync.sitPos].SetLockTarget(monster, hitPos);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user