Merge branch 'main' into DO-79-강종-처리
This commit is contained in:
commit
f44ac34c4a
@ -148,6 +148,7 @@ public partial class GameLogic : IDisposable
|
||||
TimerPause();
|
||||
ExecuteOnMainThread(() =>
|
||||
{
|
||||
GameManager.Instance.panelManager.OpenLoadingPanel(true, true, false, false);
|
||||
GameManager.Instance.panelManager.OpenDrawConfirmPanel("무승부 요청을 승낙하시겠습니까?", () =>
|
||||
{
|
||||
GameManager.Instance.panelManager.OpenEffectPanel(Enums.GameResult.Draw);
|
||||
@ -160,32 +161,52 @@ public partial class GameLogic : IDisposable
|
||||
});
|
||||
break;
|
||||
case Constants.MultiplayManagerState.DrawRequestSent:
|
||||
{
|
||||
Debug.Log("무승부 요청 전송 완료");
|
||||
ExecuteOnMainThread(() =>
|
||||
{
|
||||
GameManager.Instance.panelManager.OpenLoadingPanel(true, true, false, false);
|
||||
});
|
||||
TimerPause();
|
||||
break;
|
||||
}
|
||||
case Constants.MultiplayManagerState.DrawAccepted:
|
||||
Debug.Log("무승부 요청이 승낙이 들어옴");
|
||||
ExecuteOnMainThread(() =>
|
||||
{
|
||||
GameManager.Instance.panelManager.CloseLoadingPanel();
|
||||
GameManager.Instance.panelManager.OpenEffectPanel(Enums.GameResult.Draw);
|
||||
EndGame(Enums.GameResult.Draw);
|
||||
});
|
||||
break;
|
||||
case Constants.MultiplayManagerState.DrawConfirmed:
|
||||
{
|
||||
Debug.Log("무승부 요청 승낙 완료");
|
||||
ExecuteOnMainThread(() =>
|
||||
{
|
||||
GameManager.Instance.panelManager.CloseLoadingPanel();
|
||||
});
|
||||
break;
|
||||
}
|
||||
case Constants.MultiplayManagerState.DrawRejected:
|
||||
Debug.Log("무승부 요청이 거부가 들어옴");
|
||||
TimerUnpause();
|
||||
ExecuteOnMainThread(() =>
|
||||
{
|
||||
GameManager.Instance.panelManager.CloseLoadingPanel();
|
||||
GameManager.Instance.panelManager.OpenConfirmPanel("무승부 요청을 거부하였습니다.", () => { });
|
||||
});
|
||||
break;
|
||||
case Constants.MultiplayManagerState.DrawRejectionConfirmed:
|
||||
{
|
||||
Debug.Log("무승부 요청 거부 완료");
|
||||
ExecuteOnMainThread(() =>
|
||||
{
|
||||
GameManager.Instance.panelManager.OpenLoadingPanel(true, true, false, false);
|
||||
});
|
||||
TimerUnpause();
|
||||
break;
|
||||
}
|
||||
case Constants.MultiplayManagerState.ReceiveTimeout:
|
||||
Debug.Log("상대방이 타임 아웃 됨");
|
||||
ExecuteOnMainThread(() =>
|
||||
@ -498,7 +519,6 @@ public partial class GameLogic : IDisposable
|
||||
// 기존 멀티플레이 상태 초기화
|
||||
MultiPlayManager = null;
|
||||
_roomId = null;
|
||||
GameType = Enums.GameType.SinglePlay;
|
||||
|
||||
// 싱글 플레이 상태로 변경
|
||||
InitializeSinglePlayMode();
|
||||
@ -532,6 +552,12 @@ public partial class GameLogic : IDisposable
|
||||
}
|
||||
}
|
||||
|
||||
// 타이머 일시정지
|
||||
private void TimerPause() => FioTimer.PauseTimer();
|
||||
|
||||
// 타이머 일시정지 해제
|
||||
private void TimerUnpause() => FioTimer.StartTimer();
|
||||
|
||||
// 이전에 표시된 금수 마크 제거
|
||||
private void ClearForbiddenMarks()
|
||||
{
|
||||
@ -555,12 +581,6 @@ public partial class GameLogic : IDisposable
|
||||
return AI_NAMIES[index];
|
||||
}
|
||||
|
||||
// 타이머 일시정지
|
||||
private void TimerPause() => FioTimer.PauseTimer();
|
||||
|
||||
// 타이머 일시정지 해제
|
||||
private void TimerUnpause() => FioTimer.StartTimer();
|
||||
|
||||
#endregion
|
||||
|
||||
public void ChangeGameInProgress(bool inProgress)
|
||||
|
@ -90,4 +90,10 @@ public partial class GameLogic
|
||||
ChangeGameInProgress(false);
|
||||
Debug.Log("GameInProgress 변경 false");
|
||||
}
|
||||
|
||||
public void SetLastPositioned(int row, int col)
|
||||
{
|
||||
_lastRow = row;
|
||||
_lastCol = col;
|
||||
}
|
||||
}
|
@ -215,6 +215,16 @@ public class ReplayManager : Singleton<ReplayManager>
|
||||
{
|
||||
ReplayManager.Instance.PushUndoMove(targetMove);
|
||||
_gameLogic.RemoveStone(targetMove.columnIndex, targetMove.rowIndex);
|
||||
if (_placedStoneStack.Count > 0)
|
||||
{
|
||||
var undoLastMove = _placedStoneStack.Peek();
|
||||
_gameLogic.StoneController.SetStoneState(Enums.StoneState.LastPositioned, undoLastMove.columnIndex, undoLastMove.rowIndex);
|
||||
_gameLogic.SetLastPositioned(undoLastMove.columnIndex, undoLastMove.rowIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
_gameLogic.SetLastPositioned(-1, -1);
|
||||
}
|
||||
}
|
||||
|
||||
public void ReplayFirst()
|
||||
|
Loading…
x
Reference in New Issue
Block a user