Merge pull request #80 from Degulleo/DO-81-무승부-요청시-로딩화면-적용
무승부 요청 그리고 응답시 플레이어 화면에 로딩패널 띄우고 닫기
This commit is contained in:
commit
b1dd4aefbc
@ -141,6 +141,7 @@ public partial class GameLogic : IDisposable
|
|||||||
TimerPause();
|
TimerPause();
|
||||||
ExecuteOnMainThread(() =>
|
ExecuteOnMainThread(() =>
|
||||||
{
|
{
|
||||||
|
GameManager.Instance.panelManager.OpenLoadingPanel(true, true, false, false);
|
||||||
GameManager.Instance.panelManager.OpenDrawConfirmPanel("무승부 요청을 승낙하시겠습니까?", () =>
|
GameManager.Instance.panelManager.OpenDrawConfirmPanel("무승부 요청을 승낙하시겠습니까?", () =>
|
||||||
{
|
{
|
||||||
GameManager.Instance.panelManager.OpenEffectPanel(Enums.GameResult.Draw);
|
GameManager.Instance.panelManager.OpenEffectPanel(Enums.GameResult.Draw);
|
||||||
@ -153,32 +154,52 @@ public partial class GameLogic : IDisposable
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case Constants.MultiplayManagerState.DrawRequestSent:
|
case Constants.MultiplayManagerState.DrawRequestSent:
|
||||||
|
{
|
||||||
Debug.Log("무승부 요청 전송 완료");
|
Debug.Log("무승부 요청 전송 완료");
|
||||||
|
ExecuteOnMainThread(() =>
|
||||||
|
{
|
||||||
|
GameManager.Instance.panelManager.OpenLoadingPanel(true, true, false, false);
|
||||||
|
});
|
||||||
TimerPause();
|
TimerPause();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case Constants.MultiplayManagerState.DrawAccepted:
|
case Constants.MultiplayManagerState.DrawAccepted:
|
||||||
Debug.Log("무승부 요청이 승낙이 들어옴");
|
Debug.Log("무승부 요청이 승낙이 들어옴");
|
||||||
ExecuteOnMainThread(() =>
|
ExecuteOnMainThread(() =>
|
||||||
{
|
{
|
||||||
|
GameManager.Instance.panelManager.CloseLoadingPanel();
|
||||||
GameManager.Instance.panelManager.OpenEffectPanel(Enums.GameResult.Draw);
|
GameManager.Instance.panelManager.OpenEffectPanel(Enums.GameResult.Draw);
|
||||||
EndGame(Enums.GameResult.Draw);
|
EndGame(Enums.GameResult.Draw);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case Constants.MultiplayManagerState.DrawConfirmed:
|
case Constants.MultiplayManagerState.DrawConfirmed:
|
||||||
|
{
|
||||||
Debug.Log("무승부 요청 승낙 완료");
|
Debug.Log("무승부 요청 승낙 완료");
|
||||||
|
ExecuteOnMainThread(() =>
|
||||||
|
{
|
||||||
|
GameManager.Instance.panelManager.CloseLoadingPanel();
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case Constants.MultiplayManagerState.DrawRejected:
|
case Constants.MultiplayManagerState.DrawRejected:
|
||||||
Debug.Log("무승부 요청이 거부가 들어옴");
|
Debug.Log("무승부 요청이 거부가 들어옴");
|
||||||
TimerUnpause();
|
TimerUnpause();
|
||||||
ExecuteOnMainThread(() =>
|
ExecuteOnMainThread(() =>
|
||||||
{
|
{
|
||||||
|
GameManager.Instance.panelManager.CloseLoadingPanel();
|
||||||
GameManager.Instance.panelManager.OpenConfirmPanel("무승부 요청을 거부하였습니다.", () => { });
|
GameManager.Instance.panelManager.OpenConfirmPanel("무승부 요청을 거부하였습니다.", () => { });
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case Constants.MultiplayManagerState.DrawRejectionConfirmed:
|
case Constants.MultiplayManagerState.DrawRejectionConfirmed:
|
||||||
|
{
|
||||||
Debug.Log("무승부 요청 거부 완료");
|
Debug.Log("무승부 요청 거부 완료");
|
||||||
|
ExecuteOnMainThread(() =>
|
||||||
|
{
|
||||||
|
GameManager.Instance.panelManager.OpenLoadingPanel(true, true, false, false);
|
||||||
|
});
|
||||||
TimerUnpause();
|
TimerUnpause();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case Constants.MultiplayManagerState.ReceiveTimeout:
|
case Constants.MultiplayManagerState.ReceiveTimeout:
|
||||||
Debug.Log("상대방이 타임 아웃 됨");
|
Debug.Log("상대방이 타임 아웃 됨");
|
||||||
ExecuteOnMainThread(() =>
|
ExecuteOnMainThread(() =>
|
||||||
@ -476,7 +497,6 @@ public partial class GameLogic : IDisposable
|
|||||||
// 기존 멀티플레이 상태 초기화
|
// 기존 멀티플레이 상태 초기화
|
||||||
MultiPlayManager = null;
|
MultiPlayManager = null;
|
||||||
_roomId = null;
|
_roomId = null;
|
||||||
GameType = Enums.GameType.SinglePlay;
|
|
||||||
|
|
||||||
// 싱글 플레이 상태로 변경
|
// 싱글 플레이 상태로 변경
|
||||||
InitializeSinglePlayMode();
|
InitializeSinglePlayMode();
|
||||||
@ -533,12 +553,6 @@ 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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user