This commit is contained in:
2026-07-26 22:44:45 +08:00
parent 2c05f09d36
commit 48863cc4f8
3 changed files with 6 additions and 10 deletions
+1 -1
View File
@@ -908,7 +908,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 22400762, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchoredPosition.y
value: -0.0000076293945
value: -0.000022888184
objectReference: {fileID: 0}
- target: {fileID: 22426080, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMax.x
@@ -145,6 +145,10 @@ public class MonsterContral : MonoBehaviour
{
LoadHitEffect();
baseMmove = isMove;
// ⭐ isMove=true 的鱼初始放在屏幕外 (9999,9999,0),
// 等待 MoveUpdate 根据 moveTime 算出曲线位置后自然显示
if (isMove)
transform.position = new Vector3(9999, 9999, 0);
}
public async void LoadHitEffect()
{
@@ -252,15 +256,7 @@ public class MonsterContral : MonoBehaviour
// isMove=false 的鱼不需要移动路线,直接归位到 (0,0,0)
if (!isMove)
{
transform.position = Vector3.zero;
}
else
{
// ⭐ isMove=true 的鱼刚创建时,初始位置设置成曲线的第一个点,
// 避免在 moveTime 更新前卡在初始位置 (9999,9999,0) 中间
transform.position = new Vector3(bezierData.start.x, bezierData.start.y, 0);
}
// 路径结束后自动销毁
//StartCoroutine(yanchi(gameObject, time, isyuzhen));
@@ -717,7 +717,6 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
CreateFishManager.Instance.isResources = true;
JinDuTiao.SetProgress(0.9f);
await Task.Delay(2000);
// ⭐ 鱼创建由服务端 OnFishSpawn 事件统一下发,客户端无需房主出鱼/请求同步。
// 玩家进入房间后服务端会主动推送 OnFishSpawn(type="init") 初始鱼,
@@ -739,6 +738,7 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
// 处理完清空,避免重复处理(如场景重载)
GameManager.Instance.gameData.currRoomData.activeFishes = null;
}
await Task.Delay(2000);
JinDuTiao.SetProgress(1);
await Task.Delay(300);