| | |
| | | int nextSpeedIndex = (BattleManager.Instance.speedIndex + 1) % BattleManager.Instance.speedGear.Length; |
| | | // 检查下一档倍速功能是否开启 |
| | | int nextSpeedFuncId = BattleManager.Instance.speedIndexfuncIdArr[nextSpeedIndex]; |
| | | if (!FuncOpen.Instance.IsFuncOpen(nextSpeedFuncId, true)) |
| | | return; |
| | | BattleManager.Instance.speedIndex = (BattleManager.Instance.speedIndex + 1) % BattleManager.Instance.speedGear.Length; |
| | | bool isOpen = FuncOpen.Instance.IsFuncOpen(nextSpeedFuncId); |
| | | if (!isOpen && FuncOpenLVConfig.HasKey(nextSpeedFuncId)) |
| | | { |
| | | var config = FuncOpenLVConfig.Get(nextSpeedFuncId); |
| | | SysNotifyMgr.Instance.ShowTip("BattleSpeedTip", TaskManager.Instance.GetNeedFinishTaskCount(config.LimitMissionID), nextSpeedIndex + 1); |
| | | } |
| | | BattleManager.Instance.speedIndex = !isOpen ? 0 : nextSpeedIndex; |
| | | battleField.SetSpeedRatio(BattleManager.Instance.speedGear[BattleManager.Instance.speedIndex]); |
| | | if (textSpeed != null) |
| | | textSpeed.text = (BattleManager.Instance.speedIndex + 1).ToString(); |