| | |
| | | } |
| | | set |
| | | { |
| | | m_IsPause = value; |
| | | |
| | | if (m_IsPause) |
| | | if (value) |
| | | { |
| | | m_IsPause = value; |
| | | PauseGame(); |
| | | OnBattlePause?.Invoke(m_IsPause); |
| | | } |
| | | else |
| | | { |
| | | ResumeGame(); |
| | | if (CanResumeGame()) |
| | | { |
| | | m_IsPause = value; |
| | | ResumeGame(); |
| | | OnBattlePause?.Invoke(m_IsPause); |
| | | } |
| | | } |
| | | |
| | | OnBattlePause?.Invoke(m_IsPause); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | recordPlayer.ForceFinish(); |
| | | } |
| | | |
| | | |
| | | //暂停的原因有很多,需要检查各种状态 |
| | | bool CanResumeGame() |
| | | { |
| | | if (UIManager.Instance.IsOpened<NewBieWin>()) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | if (UIManager.Instance.IsOpened<EquipExchangeWin>()) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | } |