cun
This commit is contained in:
@@ -98,6 +98,7 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
public bool isCreateFish; //是否可以创建鱼
|
||||
public bool isFrozen = false; //是否冰冻中(冻结出鱼+所有鱼定格)
|
||||
private Dictionary<string, CharacterStateType> frozenFishStates = new Dictionary<string, CharacterStateType>();
|
||||
private Dictionary<string, bool> frozenFishIsMoves = new Dictionary<string, bool>();
|
||||
|
||||
/// <summary>按鱼类型分类的生成配置(Boss / 普通 / 黄金…)</summary>
|
||||
private Dictionary<FishTypeEnum, List<RoomFishDetailConfig>> fishTypeConfig;
|
||||
@@ -619,7 +620,7 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
return;
|
||||
//foreach (var item in bossList)
|
||||
//{
|
||||
// if (item.fishNumber == "13036")
|
||||
// if (item.fishNumber == "13037")
|
||||
// item.isCreate = 2;
|
||||
|
||||
// // if (item.fishNumber == "11027")
|
||||
@@ -663,7 +664,7 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
if (configs == null || configs.Count == 0) return null;
|
||||
|
||||
int totalWeight = configs.Sum(c => c.fishWeight);
|
||||
int randWeight = Random.Range(0, totalWeight+1);
|
||||
int randWeight = Random.Range(0, totalWeight + 1);
|
||||
|
||||
foreach (var cfg in configs)
|
||||
{
|
||||
@@ -1551,7 +1552,7 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
monster.transform.position, Quaternion.identity, transform.parent);
|
||||
|
||||
// 非 Boss 鱼:金币飞向炮台
|
||||
if (monster.fishenum != FishTypeEnum.Boss鱼&&monster.fishenum!=FishTypeEnum.特殊Boss)
|
||||
if (monster.fishenum != FishTypeEnum.Boss鱼 && monster.fishenum != FishTypeEnum.特殊Boss)
|
||||
{
|
||||
var award = Instantiate(
|
||||
monster.effect_DieAward != null ? monster.effect_DieAward : dieFXPrefabAward,
|
||||
@@ -1770,23 +1771,23 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
coinScript.SetCoinCount();
|
||||
|
||||
|
||||
// // Boss 鱼:显示浮动分数文本
|
||||
// var bossCtrl = (MonsterControl_BossBase)monster;
|
||||
// // Boss 鱼:显示浮动分数文本
|
||||
// var bossCtrl = (MonsterControl_BossBase)monster;
|
||||
|
||||
// bossCtrl.v3 = sitData.transform.position;
|
||||
// if (bossCtrl.isToUI)
|
||||
// {
|
||||
// bossCtrl.currEffect_DieAward = Instantiate(
|
||||
//monster.effect_DieAward != null ? monster.effect_DieAward : dieFXPrefabAwardTmp,
|
||||
//currGameType.subPanelParent.parent);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// bossCtrl.currEffect_DieAward = Instantiate(
|
||||
//monster.effect_DieAward != null ? monster.effect_DieAward : dieFXPrefabAwardTmp);
|
||||
// }
|
||||
// bossCtrl.action_effect_DieAward?.Invoke(bossCtrl.currEffect_DieAward);
|
||||
// bossCtrl.JiaFen = onScoreAdd;
|
||||
// bossCtrl.v3 = sitData.transform.position;
|
||||
// if (bossCtrl.isToUI)
|
||||
// {
|
||||
// bossCtrl.currEffect_DieAward = Instantiate(
|
||||
//monster.effect_DieAward != null ? monster.effect_DieAward : dieFXPrefabAwardTmp,
|
||||
//currGameType.subPanelParent.parent);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// bossCtrl.currEffect_DieAward = Instantiate(
|
||||
//monster.effect_DieAward != null ? monster.effect_DieAward : dieFXPrefabAwardTmp);
|
||||
// }
|
||||
// bossCtrl.action_effect_DieAward?.Invoke(bossCtrl.currEffect_DieAward);
|
||||
// bossCtrl.JiaFen = onScoreAdd;
|
||||
}
|
||||
break;
|
||||
case FishTypeEnum.特殊Boss:
|
||||
@@ -1885,6 +1886,7 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
|
||||
// 记录原状态
|
||||
frozenFishStates[m.guid] = m.currState;
|
||||
frozenFishIsMoves[m.guid] = m.isMove;
|
||||
// 定格
|
||||
m.isMove = false;
|
||||
m.ChangeState(CharacterStateType.idle);
|
||||
@@ -1907,7 +1909,9 @@ public class CreateFishManager : MonoSingleton<CreateFishManager>
|
||||
MonsterContral m = kv.Value;
|
||||
if (m == null || !m.gameObject.activeInHierarchy) continue;
|
||||
|
||||
m.isMove = true;
|
||||
if (frozenFishIsMoves.TryGetValue(m.guid, out var prevIsMove))
|
||||
m.isMove = prevIsMove;
|
||||
|
||||
m.SetFreezeEffect(false);
|
||||
if (frozenFishStates.TryGetValue(m.guid, out var prevState))
|
||||
m.ChangeState(prevState);
|
||||
|
||||
@@ -54,6 +54,18 @@ public class GameManager : MonoSingleton<GameManager>
|
||||
}
|
||||
protected override void Awake()
|
||||
{
|
||||
// ⭐ 游戏启动时加载已保存的画质和帧率设置
|
||||
int quality = PlayerPrefs.GetInt("GraphicsQuality", 1);
|
||||
QualitySettings.SetQualityLevel(quality, true);
|
||||
|
||||
int fps = PlayerPrefs.GetInt("TargetFps", 1);
|
||||
Application.targetFrameRate = fps switch
|
||||
{
|
||||
0 => 30,
|
||||
1 => 60,
|
||||
2 => -1,
|
||||
_ => 60
|
||||
};
|
||||
|
||||
AudioResourcesData audioResourcesData=new AudioResourcesData();
|
||||
InItLoad();
|
||||
|
||||
Reference in New Issue
Block a user