1
This commit is contained in:
@@ -152,6 +152,16 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
public Dictionary<string, MonsterContral> fishDatas_hashCodekey_TS = new Dictionary<string, MonsterContral>();
|
||||
/// <summary>特殊 Boss</summary>
|
||||
public Dictionary<string, MonsterContral> fishDatas_hashCodekey_TS_Boss = new Dictionary<string, MonsterContral>();
|
||||
|
||||
#if UNITY_EDITOR
|
||||
// ⭐ 编辑器调试 List:与上方字典同步,方便在 Inspector 查看当前场上活鱼
|
||||
public List<MonsterContral> fishList_All = new List<MonsterContral>();
|
||||
public List<MonsterContral> fishList_Small = new List<MonsterContral>();
|
||||
public List<MonsterContral> fishList_Boss = new List<MonsterContral>();
|
||||
public List<MonsterContral> fishList_HJ = new List<MonsterContral>();
|
||||
public List<MonsterContral> fishList_TS = new List<MonsterContral>();
|
||||
public List<MonsterContral> fishList_TS_Boss = new List<MonsterContral>();
|
||||
#endif
|
||||
// ------ 各类计时器 ------
|
||||
private RoomFishProbabilityConfig tsbossCreateData; // 特殊Boss 创建数据
|
||||
private float tsbossTimer = 999f; // 特殊Boss 刷新倒计时(秒)
|
||||
@@ -884,6 +894,19 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
fishDatas_hashCodekey_TS_Boss[mc.guid] = mc;
|
||||
break;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
// ⭐ 同步到调试 List,方便 Inspector 查看
|
||||
if (!fishList_All.Contains(mc)) fishList_All.Add(mc);
|
||||
switch (fishTypeId)
|
||||
{
|
||||
case 1: if (!fishList_Small.Contains(mc)) fishList_Small.Add(mc); break;
|
||||
case 2: if (!fishList_Boss.Contains(mc)) fishList_Boss.Add(mc); break;
|
||||
case 3: if (!fishList_HJ.Contains(mc)) fishList_HJ.Add(mc); break;
|
||||
case 4: if (!fishList_TS.Contains(mc)) fishList_TS.Add(mc); break;
|
||||
case 5: if (!fishList_TS_Boss.Contains(mc)) fishList_TS_Boss.Add(mc); break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -1118,6 +1141,16 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
fishDatas_hashCodekey.Clear();
|
||||
fishDatas_hashCodekey_Boss.Clear();
|
||||
fishDatas_hashCodekey_Small.Clear();
|
||||
|
||||
#if UNITY_EDITOR
|
||||
// ⭐ 清理调试 List
|
||||
fishList_All.Clear();
|
||||
fishList_Small.Clear();
|
||||
fishList_Boss.Clear();
|
||||
fishList_HJ.Clear();
|
||||
fishList_TS.Clear();
|
||||
fishList_TS_Boss.Clear();
|
||||
#endif
|
||||
foreach (Transform item in fishRoot)
|
||||
{
|
||||
Destroy(item.gameObject);
|
||||
@@ -1312,6 +1345,19 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
break;
|
||||
}
|
||||
fishDatas_hashCodekey.Remove(fishId);
|
||||
|
||||
#if UNITY_EDITOR
|
||||
// ⭐ 同步移除调试 List
|
||||
fishList_All.Remove(monster);
|
||||
switch (monster.fishenum)
|
||||
{
|
||||
case FishTypeEnum.普通鱼: fishList_Small.Remove(monster); break;
|
||||
case FishTypeEnum.Boss鱼: fishList_Boss.Remove(monster); break;
|
||||
case FishTypeEnum.黄金鱼: fishList_HJ.Remove(monster); break;
|
||||
case FishTypeEnum.特殊鱼: fishList_TS.Remove(monster); break;
|
||||
case FishTypeEnum.特殊Boss: fishList_TS_Boss.Remove(monster); break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// 按 ID 杀死一条鱼(带特效 + 金币飞出动画)。
|
||||
@@ -1355,6 +1401,19 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
|
||||
monster.DieFish();
|
||||
fishDatas_hashCodekey.Remove(fishId);
|
||||
|
||||
#if UNITY_EDITOR
|
||||
// ⭐ 同步移除调试 List
|
||||
fishList_All.Remove(monster);
|
||||
switch (monster.fishenum)
|
||||
{
|
||||
case FishTypeEnum.普通鱼: fishList_Small.Remove(monster); break;
|
||||
case FishTypeEnum.Boss鱼: fishList_Boss.Remove(monster); break;
|
||||
case FishTypeEnum.黄金鱼: fishList_HJ.Remove(monster); break;
|
||||
case FishTypeEnum.特殊鱼: fishList_TS.Remove(monster); break;
|
||||
case FishTypeEnum.特殊Boss: fishList_TS_Boss.Remove(monster); break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// 不依赖鱼,只在屏幕内随机一个位置生成金币特效,然后飞回指定点。
|
||||
|
||||
Reference in New Issue
Block a user