게이트 이동 시스템 추가 및 기존 이동 매니저 정리
This commit is contained in:
@@ -405,10 +405,10 @@ void EndRound(int winner, string message)
|
||||
if (dealerWinCount >= targetWinCount)
|
||||
{
|
||||
isMatchOver = true;
|
||||
ShowResult("Final Result\nDealer Wins!");
|
||||
Debug.Log("Final Result: Dealer Wins!");
|
||||
ShowResult("Final Result\nDealer Wins!\nTry Again!");
|
||||
Debug.Log("Final Result: Dealer Wins! Restarting match.");
|
||||
|
||||
StartCoroutine(EndMatchAfterDelay());
|
||||
StartCoroutine(RestartMatchAfterLose());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -439,6 +439,31 @@ IEnumerator EndMatchAfterDelay()
|
||||
onMatchEnded?.Invoke();
|
||||
}
|
||||
|
||||
IEnumerator RestartMatchAfterLose()
|
||||
{
|
||||
if (isEndingMatch)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
isEndingMatch = true;
|
||||
|
||||
yield return new WaitForSeconds(matchEndDelay);
|
||||
|
||||
playerWinCount = 0;
|
||||
dealerWinCount = 0;
|
||||
|
||||
isMatchOver = false;
|
||||
isGameOver = true;
|
||||
isPlayerTurn = false;
|
||||
isEndingMatch = false;
|
||||
|
||||
HideAllWinMarks();
|
||||
StartRound();
|
||||
|
||||
Debug.Log("Blackjack restarted after player lost.");
|
||||
}
|
||||
|
||||
void UpdateScoreUI(bool showDealerFullScore)
|
||||
{
|
||||
int playerScore = CalculateScore(playerCards);
|
||||
|
||||
Reference in New Issue
Block a user