DO-80 [feat] 무승부 제안 주고 받는 중 타이머 일시 정지

This commit is contained in:
fiore 2025-03-28 11:14:52 +09:00
parent 588d77b147
commit 2ebc574681

View File

@ -138,6 +138,7 @@ public partial class GameLogic : IDisposable
break; break;
case Constants.MultiplayManagerState.ReceiveDrawRequest: case Constants.MultiplayManagerState.ReceiveDrawRequest:
Debug.Log("상대방의 무승부 요청 들어옴"); Debug.Log("상대방의 무승부 요청 들어옴");
TimerPause();
ExecuteOnMainThread(() => ExecuteOnMainThread(() =>
{ {
GameManager.Instance.panelManager.OpenDrawConfirmPanel("무승부 요청을 승낙하시겠습니까?", () => GameManager.Instance.panelManager.OpenDrawConfirmPanel("무승부 요청을 승낙하시겠습니까?", () =>
@ -153,6 +154,7 @@ public partial class GameLogic : IDisposable
break; break;
case Constants.MultiplayManagerState.DrawRequestSent: case Constants.MultiplayManagerState.DrawRequestSent:
Debug.Log("무승부 요청 전송 완료"); Debug.Log("무승부 요청 전송 완료");
TimerPause();
break; break;
case Constants.MultiplayManagerState.DrawAccepted: case Constants.MultiplayManagerState.DrawAccepted:
Debug.Log("무승부 요청이 승낙이 들어옴"); Debug.Log("무승부 요청이 승낙이 들어옴");
@ -167,6 +169,7 @@ public partial class GameLogic : IDisposable
break; break;
case Constants.MultiplayManagerState.DrawRejected: case Constants.MultiplayManagerState.DrawRejected:
Debug.Log("무승부 요청이 거부가 들어옴"); Debug.Log("무승부 요청이 거부가 들어옴");
TimerUnpause();
ExecuteOnMainThread(() => ExecuteOnMainThread(() =>
{ {
GameManager.Instance.panelManager.OpenConfirmPanel("무승부 요청을 거부하였습니다.", () => { }); GameManager.Instance.panelManager.OpenConfirmPanel("무승부 요청을 거부하였습니다.", () => { });
@ -174,7 +177,7 @@ public partial class GameLogic : IDisposable
break; break;
case Constants.MultiplayManagerState.DrawRejectionConfirmed: case Constants.MultiplayManagerState.DrawRejectionConfirmed:
Debug.Log("무승부 요청 거부 완료"); Debug.Log("무승부 요청 거부 완료");
TimerUnpause();
break; break;
case Constants.MultiplayManagerState.ReceiveTimeout: case Constants.MultiplayManagerState.ReceiveTimeout:
Debug.Log("상대방이 타임 아웃 됨"); Debug.Log("상대방이 타임 아웃 됨");
@ -529,6 +532,12 @@ public partial class GameLogic : IDisposable
return AI_NAMIES[index]; return AI_NAMIES[index];
} }
// 타이머 일시정지
private void TimerPause() => FioTimer.PauseTimer();
// 타이머 일시정지 해제
private void TimerUnpause() => FioTimer.StartTimer();
#endregion #endregion
public void Dispose() public void Dispose()