1
This commit is contained in:
@@ -130,6 +130,8 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
[Tooltip("按 M 键生成的鱼编号(配置 fishNumber)")]
|
||||
public string debugSpawnFishNumber = "11043";
|
||||
public bool isleft = true;
|
||||
[Tooltip("按M键批量模式:激活=本地在所有普通鱼路线上各生成一条(不走服务端);不激活=走服务端出一条")]
|
||||
public bool debugSpawnAllLines = false;
|
||||
private Dictionary<string, CharacterStateType> frozenFishStates = new Dictionary<string, CharacterStateType>();
|
||||
private Dictionary<string, bool> frozenFishIsMoves = new Dictionary<string, bool>();
|
||||
|
||||
@@ -333,7 +335,23 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
Debug.LogWarning("[CreateFishManager] 当前未在房间中(roomId 为空),无法出鱼");
|
||||
return;
|
||||
}
|
||||
APIManager.TempSpawnFish(roomId, debugSpawnFishNumber,1,30, isleft?1:2);
|
||||
// ⭐ debugSpawnAllLines 激活:本地在所有普通鱼路线("曲线"+id)上各生成一条(不走服务端);
|
||||
// 不激活:走服务端 AdminApi 出一条(现状)
|
||||
if (debugSpawnAllLines)
|
||||
{
|
||||
int spawned = 0;
|
||||
foreach (var key in MonsterMoveLine.dic_BezierCurveDatas.Keys)
|
||||
{
|
||||
if (key == null || !key.StartsWith("曲线")) continue;
|
||||
if (!int.TryParse(key.Substring(2), out int rid)) continue;
|
||||
if (ManualSpawn(debugSpawnFishNumber, rid, 30)) spawned++;
|
||||
}
|
||||
Debug.Log($"[CreateFishManager] 调试批量出鱼(所有路线): fishNumber={debugSpawnFishNumber}, 共生成{spawned}条");
|
||||
}
|
||||
else
|
||||
{
|
||||
APIManager.TempSpawnFish(roomId, debugSpawnFishNumber,1,30, isleft?1:2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2078,28 +2096,30 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
}
|
||||
|
||||
// 特殊鱼:金币飞向炮台(池化,动画事件播完手动回池)
|
||||
// ⭐ Get 不设置位置:DieEffect_TSY(ZDX 炸弹蟹等)爆奖完全用预制体里配置好的位置(含 y 轴);
|
||||
// 只有 BJBase 金币特效按鱼死亡位置摆放(startPoint 依赖)
|
||||
var award = EffectPool.Instance.Get(
|
||||
monster.effect_DieAward != null ? monster.effect_DieAward : dieFXPrefabAward,
|
||||
monster.transform.position, Quaternion.identity, currGameType.subPanelParent.parent,
|
||||
currGameType.subPanelParent.parent,
|
||||
autoReturn: false);
|
||||
try
|
||||
{
|
||||
award.GetComponent<RectTransform>().anchoredPosition =
|
||||
CoordinateTransformation.WorldPos_ToCanvas(
|
||||
monster.transform.position,
|
||||
GetUiCanvas());
|
||||
}
|
||||
catch
|
||||
{
|
||||
award.transform.position = monster.transform.position;
|
||||
|
||||
}
|
||||
|
||||
|
||||
var coinScript = award.GetComponent<BJBase>();
|
||||
if (coinScript != null)
|
||||
{
|
||||
// 普通爆奖(BJBase 体系)
|
||||
// 普通爆奖(BJBase 体系):摆到鱼死亡位置(画布坐标),startPoint 依赖
|
||||
try
|
||||
{
|
||||
award.GetComponent<RectTransform>().anchoredPosition =
|
||||
CoordinateTransformation.WorldPos_ToCanvas(
|
||||
monster.transform.position,
|
||||
GetUiCanvas());
|
||||
}
|
||||
catch
|
||||
{
|
||||
award.transform.position = monster.transform.position;
|
||||
|
||||
}
|
||||
|
||||
coinScript.startPoint = award.transform.position;
|
||||
coinScript.Init(killFish.gold, sitData.transform.position, killFish.userId, sitData.posID, killFish.param);
|
||||
coinScript.isLocalCoin = sitData.user == GameManager.Instance.user.id;
|
||||
|
||||
Reference in New Issue
Block a user