| | |
| | | /// </summary> |
| | | protected virtual void OnClickPass() |
| | | { |
| | | if (null == battleField) |
| | | if (!IsPass()) |
| | | return; |
| | | battleField.ForceFinish(); |
| | | } |
| | | |
| | | public bool IsPass() |
| | | { |
| | | if (null == battleField) |
| | | return false; |
| | | // 检查是否为永久特权卡玩家 |
| | | bool hasForeverPrivilege = InvestModel.Instance.IsInvested(InvestModel.foreverCardType); |
| | | |
| | | if (!hasForeverPrivilege && !FuncOpen.Instance.IsFuncOpen(BattleManager.Instance.passFuncId, true)) |
| | | return; |
| | | return false; |
| | | |
| | | int passRound = BattleManager.Instance.defaultPassRound; |
| | | var name = battleField.ToString(); |
| | |
| | | |
| | | if (passRound != 0) |
| | | { |
| | | int nowRound = battleField.round; |
| | | int nowRound = battleField.round; |
| | | int realPassRound = passRound + 1; // 配置是超过x回合可以跳,意味着x+1回合可以跳 |
| | | if (nowRound < realPassRound) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("BattlePass", realPassRound - nowRound); |
| | | return; |
| | | return false; |
| | | } |
| | | } |
| | | battleField.ForceFinish(); |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |