This commit is contained in:
2026-10-07 23:47:43 +08:00
parent e54eeee1c3
commit e2741fa837
21 changed files with 9856 additions and 11 deletions
@@ -1143,32 +1143,32 @@ PrefabInstance:
- target: {fileID: 3756200637886869943, guid: 24f1136b5772c7a428221f9ea1e47092,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.7034063
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3756200637886869943, guid: 24f1136b5772c7a428221f9ea1e47092,
type: 3}
propertyPath: m_LocalRotation.x
value: -0.086823694
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3756200637886869943, guid: 24f1136b5772c7a428221f9ea1e47092,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.70005035
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3756200637886869943, guid: 24f1136b5772c7a428221f9ea1e47092,
type: 3}
propertyPath: m_LocalRotation.z
value: -0.08723991
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3756200637886869943, guid: 24f1136b5772c7a428221f9ea1e47092,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 89.726
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3756200637886869943, guid: 24f1136b5772c7a428221f9ea1e47092,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: -14.14
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3761405308027878197, guid: 24f1136b5772c7a428221f9ea1e47092,
type: 3}
@@ -1293,7 +1293,7 @@ PrefabInstance:
- target: {fileID: 4919981281746337587, guid: 24f1136b5772c7a428221f9ea1e47092,
type: 3}
propertyPath: m_IsActive
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4926413553594997501, guid: 24f1136b5772c7a428221f9ea1e47092,
type: 3}
@@ -1373,12 +1373,47 @@ PrefabInstance:
- target: {fileID: 5767362588169840811, guid: 24f1136b5772c7a428221f9ea1e47092,
type: 3}
propertyPath: m_LocalPosition.x
value: 0.57
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5767362588169840811, guid: 24f1136b5772c7a428221f9ea1e47092,
type: 3}
propertyPath: m_LocalPosition.y
value: -2.28
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5767362588169840811, guid: 24f1136b5772c7a428221f9ea1e47092,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 5767362588169840811, guid: 24f1136b5772c7a428221f9ea1e47092,
type: 3}
propertyPath: m_LocalRotation.x
value: -0.5
objectReference: {fileID: 0}
- target: {fileID: 5767362588169840811, guid: 24f1136b5772c7a428221f9ea1e47092,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 5767362588169840811, guid: 24f1136b5772c7a428221f9ea1e47092,
type: 3}
propertyPath: m_LocalRotation.z
value: -0.5
objectReference: {fileID: 0}
- target: {fileID: 5767362588169840811, guid: 24f1136b5772c7a428221f9ea1e47092,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5767362588169840811, guid: 24f1136b5772c7a428221f9ea1e47092,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 90
objectReference: {fileID: 0}
- target: {fileID: 5767362588169840811, guid: 24f1136b5772c7a428221f9ea1e47092,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: -90
objectReference: {fileID: 0}
- target: {fileID: 5775359198218394840, guid: 24f1136b5772c7a428221f9ea1e47092,
type: 3}
@@ -1941,7 +1976,7 @@ MonoBehaviour:
isMove: 1
is3D: 0
forwordXYZ:
fishenum: 0
fishenum: 2
moveTime: 0
yzGroupTimeOffset: 0
isyz: 0
@@ -0,0 +1,59 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &2405481443112571488
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1994669770593665, guid: 15a485e3864a7334dadf9b944805b86b, type: 3}
propertyPath: m_Name
value: F4BY_SummonAppear Variant
objectReference: {fileID: 0}
- target: {fileID: 4471861886392463, guid: 15a485e3864a7334dadf9b944805b86b, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4471861886392463, guid: 15a485e3864a7334dadf9b944805b86b, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4471861886392463, guid: 15a485e3864a7334dadf9b944805b86b, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4471861886392463, guid: 15a485e3864a7334dadf9b944805b86b, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4471861886392463, guid: 15a485e3864a7334dadf9b944805b86b, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4471861886392463, guid: 15a485e3864a7334dadf9b944805b86b, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4471861886392463, guid: 15a485e3864a7334dadf9b944805b86b, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4471861886392463, guid: 15a485e3864a7334dadf9b944805b86b, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4471861886392463, guid: 15a485e3864a7334dadf9b944805b86b, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4471861886392463, guid: 15a485e3864a7334dadf9b944805b86b, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: -0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 15a485e3864a7334dadf9b944805b86b, type: 3}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 4af40e2eddac35f4190956bdbad5ef4c
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -2226,10 +2226,21 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
}
}
/// <summary>
/// 召唤卡召唤出的鱼(特殊处理用):被漩涡卷出来直接放到屏幕中央 = 路线 0.5 位置。
/// 之后步骤(漩涡特效等)基于此引用继续处理。
/// </summary>
private MonsterContral _summonFish;
/// <summary>召唤鱼 guid(= 服务端 fishId.ToString()):Notice 比 OnFishSpawn 先到时记录,等鱼建出来再检索</summary>
private string _summonFishGuid;
/// <summary>
/// 服务端 SummonCardFishNotice 房间广播回调:某玩家使用召唤卡,服务端已创建召唤鱼。
/// 仅播放召唤提示(飞机场召唤Boss鱼,其他场次召唤黄金鱼),
/// 实际鱼对象由服务端 OnFishSpawn 下发创建,这里不重复生成鱼。
/// ⭐ 特殊处理:检索出这条召唤鱼保存引用,并把开始时间加整体时间的一半
/// (moveTime = 总时长 * 0.5),让鱼直接出现在路线 0.5 位置(屏幕中央),
/// 之后从中间继续向终点游,剩余存活时长自动减半。
/// </summary>
public void OnSummonCardFishNotice(SummonCardFishNoticeData data)
{
@@ -2238,6 +2249,62 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
? (data.fishType == 2 ? "Boss鱼" : "黄金鱼")
: data.fishTypeName;
UIManager.Instance.ShowBoardError($"{data.userName} 使用召唤卡召唤了一条{fishName}");
// ⭐ 检索召唤鱼:guid = 服务端 fishId.ToString()(与 fishDatas_hashCodekey 的 key 一致)
_summonFishGuid = data.fishId.ToString();
_summonFish = null;
if (TryGetSummonFish(_summonFishGuid, out var monster))
{
ApplySummonFishCenterSpawn(monster);
}
else
{
// OnFishSpawn 还没建出这条鱼(Notice 先到):轮询等鱼建出来再处理
StartCoroutine(WaitSummonFishAndCenterSpawn(_summonFishGuid));
}
}
/// <summary>按 guid 检索召唤鱼(guid = 服务端 fishId.ToString(),OnFishSpawn 建鱼时写入)</summary>
private bool TryGetSummonFish(string guid, out MonsterContral monster)
{
monster = null;
if (string.IsNullOrEmpty(guid)) return false;
var dict = CreateFishManager.Instance?.fishDatas_hashCodekey;
if (dict == null) return false;
if (!dict.TryGetValue(guid, out var m) || m == null) return false;
monster = m;
return true;
}
/// <summary>等待 OnFishSpawn 建出召唤鱼后应用中点出生(Notice 比 OnFishSpawn 先到的时序兜底;guid 变了说明来了新召唤,协程作废)</summary>
private IEnumerator WaitSummonFishAndCenterSpawn(string guid)
{
float timeout = Time.time + 5f; // 最多等 5 秒(服务端 OnFishSpawn 正常几百毫秒内到)
while (Time.time < timeout && _summonFishGuid == guid)
{
if (TryGetSummonFish(guid, out var monster))
{
ApplySummonFishCenterSpawn(monster);
yield break;
}
yield return new WaitForSeconds(0.1f);
}
}
/// <summary>
/// 召唤鱼特殊处理:保存引用 + 开始时间加整体时间的一半。
/// moveTime 初始 = moveLine.moveTime * 0.5 → 鱼直接出现在路线 0.5 位置(屏幕中央),
/// 之后从中间继续向终点游(moveTime 继续累计,走满总时长离场)。
/// isMove=false 的鱼不走路线(固定位置播动画),跳过偏移。
/// </summary>
private void ApplySummonFishCenterSpawn(MonsterContral monster)
{
_summonFish = monster;
if (monster == null || !monster.isMove) return;
var moveLine = monster.monsterData?.moveLine;
if (moveLine == null || moveLine.moveTime <= 0f) return;
// ⭐ 开始时间 = 0 + 整体时间的一半 → 直接放在路线 0.5(屏幕中央)
monster.moveTime = moveLine.moveTime * 0.5f;
}
/// <summary>