1
This commit is contained in:
@@ -128,7 +128,7 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
public Toggle toggle_Three;
|
||||
public Toggle toggle_Shuang;
|
||||
public Toggle toggle_BaoZou;
|
||||
public Image img_BaoZou;
|
||||
public Image img_BaoZou;
|
||||
public float frenzyDuration = 5f; // 疯狂状态持续时间
|
||||
public float currFrenzyTime = 0f;
|
||||
public Toggle toggle_BingFeng;
|
||||
@@ -151,7 +151,7 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
|
||||
AudioClip bulletClip;
|
||||
|
||||
public List<int> paoBeiList=new List<int>();
|
||||
public List<int> paoBeiList = new List<int>();
|
||||
|
||||
public ProgressBar JinDuTiao;
|
||||
#region UI
|
||||
@@ -172,9 +172,9 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
int l = GameManager.Instance.gameData.currRoomData.roomLevel;
|
||||
foreach (var item in GameManager.Instance.gameConfig.roomConfigs)
|
||||
{
|
||||
if (item.gameType== t && l == GameManager.Instance.gameData.currRoomData.roomLevel)
|
||||
if (item.gameType == t && l == GameManager.Instance.gameData.currRoomData.roomLevel)
|
||||
{
|
||||
paoBeiList= item.cannonMultipleList;
|
||||
paoBeiList = item.cannonMultipleList;
|
||||
}
|
||||
}
|
||||
string roomId = GameManager.Instance.gameData.currRoomData.roomId;
|
||||
@@ -190,7 +190,7 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
|
||||
foreach (var item in list_Sits)
|
||||
{
|
||||
if (item.posID== roomJoinNotice.position)
|
||||
if (item.posID == roomJoinNotice.position)
|
||||
{
|
||||
currSitData = item;
|
||||
|
||||
@@ -389,11 +389,11 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
|
||||
|
||||
|
||||
HandleInput();
|
||||
HandleAutoRotate();
|
||||
HandleInput();
|
||||
CheckLockTargetValid();//锁定目标失效自动清除
|
||||
|
||||
|
||||
|
||||
HandleAutoFire(); // 自动开火真正发射
|
||||
HandleLock();
|
||||
UpdateLockFX();
|
||||
@@ -875,7 +875,7 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
{
|
||||
targetMonster = m;
|
||||
targetHitPos = m.transform;
|
||||
// 优先用活跃 collider;否则用 lockPoint;再否则留 transform
|
||||
// 优先用活跃 collider
|
||||
if (m.colliderList != null && m.colliderList.Count > 0)
|
||||
{
|
||||
foreach (var col in m.colliderList)
|
||||
@@ -883,10 +883,6 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
if (col.gameObject.activeInHierarchy) { targetHitPos = col; break; }
|
||||
}
|
||||
}
|
||||
else if (m.lockPoint != null)
|
||||
{
|
||||
targetHitPos = m.lockPoint;
|
||||
}
|
||||
}
|
||||
|
||||
if (targetMonster != null)
|
||||
@@ -1000,11 +996,11 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
switch (monster.fishenum)
|
||||
{
|
||||
case FishTypeEnum.特殊Boss: return 5;
|
||||
case FishTypeEnum.Boss鱼: return 4;
|
||||
case FishTypeEnum.特殊鱼: return 3;
|
||||
case FishTypeEnum.黄金鱼: return 2;
|
||||
case FishTypeEnum.普通鱼: return 1;
|
||||
default: return 0;
|
||||
case FishTypeEnum.Boss鱼: return 4;
|
||||
case FishTypeEnum.特殊鱼: return 3;
|
||||
case FishTypeEnum.黄金鱼: return 2;
|
||||
case FishTypeEnum.普通鱼: return 1;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1058,10 +1054,6 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
if (col.gameObject.activeInHierarchy) { pos = col; break; }
|
||||
}
|
||||
}
|
||||
else if (m.lockPoint != null)
|
||||
{
|
||||
pos = m.lockPoint;
|
||||
}
|
||||
|
||||
result.Add((m, pos));
|
||||
selected.Add(m.guid);
|
||||
@@ -1171,8 +1163,7 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
|
||||
if (!sit.monCotl_Lock_Position.gameObject.activeInHierarchy)
|
||||
{
|
||||
bool found = false;
|
||||
if (sit.monCotl_Lock.colliderList != null && sit.monCotl_Lock.colliderList.Count > 0)
|
||||
if (sit.monCotl_Lock.colliderList != null)
|
||||
{
|
||||
foreach (Transform t in sit.monCotl_Lock.colliderList)
|
||||
{
|
||||
@@ -1180,17 +1171,10 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
{
|
||||
sit.monCotl_Lock_Position = t;
|
||||
pos = sit.monCotl_Lock_Position.position;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
{
|
||||
sit.monCotl_Lock_Position = sit.monCotl_Lock.lockPoint ?? sit.monCotl_Lock.transform;
|
||||
pos = sit.monCotl_Lock_Position.position;
|
||||
found = true;
|
||||
}
|
||||
if (!sit.monCotl_Lock_Position.gameObject.activeInHierarchy)
|
||||
{
|
||||
if (sit.lockFX.activeSelf)
|
||||
@@ -1206,10 +1190,10 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
}
|
||||
|
||||
pos.z = Camera.main.transform.position.z + 1;
|
||||
|
||||
|
||||
sit.lockFX.transform.position = pos;
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
private void CheckLockTargetValid()
|
||||
@@ -1248,9 +1232,8 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
MonsterContral target = FindAutoLockTarget();
|
||||
if (target != null)
|
||||
{
|
||||
Transform lockTr = target.lockPoint ?? target.transform;
|
||||
currSitData.SetLockTarget(target, lockTr);
|
||||
if (target.colliderList.Count>0)
|
||||
currSitData.SetLockTarget(target, target.transform);
|
||||
if (target.colliderList.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < target.colliderList.Count; i++)
|
||||
{
|
||||
@@ -1420,7 +1403,7 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
|
||||
|
||||
|
||||
private void SyncLock(List<string> monsterguid,int index=-1)
|
||||
private void SyncLock(List<string> monsterguid, int index = -1)
|
||||
{
|
||||
SyncGameData sgd = new SyncGameData
|
||||
{
|
||||
@@ -1430,7 +1413,7 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
frameData = new FrameData_ChangeAutoTarget
|
||||
{
|
||||
targetGuid = monsterguid,
|
||||
colliderIndex=index,
|
||||
colliderIndex = index,
|
||||
}
|
||||
};
|
||||
WebSocketSendList.SyncGameData(sgd);
|
||||
@@ -1509,7 +1492,7 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
if (monster.colliderList != null && monster.colliderList.Count > 0 && data.colliderIndex != -1)
|
||||
hitPos = monster.colliderList[data.colliderIndex];
|
||||
else
|
||||
hitPos = monster.lockPoint ?? monster.transform;
|
||||
hitPos = monster.transform;
|
||||
|
||||
list_Sits[sync.sitPos].SetLockTarget(monster, hitPos);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user