Merge branch 'main' into DO-79-강종-처리
This commit is contained in:
commit
f44ac34c4a
@ -148,6 +148,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);
|
||||||
@ -160,32 +161,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(() =>
|
||||||
@ -498,7 +519,6 @@ public partial class GameLogic : IDisposable
|
|||||||
// 기존 멀티플레이 상태 초기화
|
// 기존 멀티플레이 상태 초기화
|
||||||
MultiPlayManager = null;
|
MultiPlayManager = null;
|
||||||
_roomId = null;
|
_roomId = null;
|
||||||
GameType = Enums.GameType.SinglePlay;
|
|
||||||
|
|
||||||
// 싱글 플레이 상태로 변경
|
// 싱글 플레이 상태로 변경
|
||||||
InitializeSinglePlayMode();
|
InitializeSinglePlayMode();
|
||||||
@ -532,6 +552,12 @@ public partial class GameLogic : IDisposable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 타이머 일시정지
|
||||||
|
private void TimerPause() => FioTimer.PauseTimer();
|
||||||
|
|
||||||
|
// 타이머 일시정지 해제
|
||||||
|
private void TimerUnpause() => FioTimer.StartTimer();
|
||||||
|
|
||||||
// 이전에 표시된 금수 마크 제거
|
// 이전에 표시된 금수 마크 제거
|
||||||
private void ClearForbiddenMarks()
|
private void ClearForbiddenMarks()
|
||||||
{
|
{
|
||||||
@ -555,12 +581,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 ChangeGameInProgress(bool inProgress)
|
public void ChangeGameInProgress(bool inProgress)
|
||||||
|
@ -90,4 +90,10 @@ public partial class GameLogic
|
|||||||
ChangeGameInProgress(false);
|
ChangeGameInProgress(false);
|
||||||
Debug.Log("GameInProgress 변경 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);
|
ReplayManager.Instance.PushUndoMove(targetMove);
|
||||||
_gameLogic.RemoveStone(targetMove.columnIndex, targetMove.rowIndex);
|
_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()
|
public void ReplayFirst()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user