DO-50 [FIX] 오디오 매니저 버그 등 수정

This commit is contained in:
Jay 2025-03-24 13:44:57 +09:00
parent b60f838ecb
commit 896bd636ff
3 changed files with 20 additions and 8 deletions

View File

@ -2,6 +2,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public abstract class BasePlayerState
{
@ -19,9 +20,11 @@ public abstract class BasePlayerState
if (gameLogic.CheckGameWin(playerType, row, col))
{
GameManager.Instance.panelManager.OpenConfirmPanel($"Game Over: {playerType} Win",() =>{});
GameManager.Instance.panelManager.OpenConfirmPanel($"Game Over: {playerType} Win", () =>
{
var gameResult = playerType == Enums.PlayerType.PlayerA? Enums.GameResult.Win:Enums.GameResult.Lose;
gameLogic.EndGame(gameResult);
});
}
else
{
@ -29,8 +32,10 @@ public abstract class BasePlayerState
{
if (gameLogic.CheckGameDraw())
{
GameManager.Instance.panelManager.OpenConfirmPanel($"Game Over: Draw",() =>{});
GameManager.Instance.panelManager.OpenConfirmPanel($"Game Over: Draw", () =>
{
gameLogic.EndGame(Enums.GameResult.Draw);
});
}
else
{
@ -347,6 +352,7 @@ public class GameLogic : MonoBehaviour
SetState(null);
ReplayManager.Instance.SaveReplayDataResult(result);
//TODO: 게임 종료 후 행동 구현
SceneManager.LoadScene("Main");
}
//승리 확인 함수

View File

@ -37,10 +37,16 @@ public class GameManager : Singleton<GameManager>
}
private void InitPanels()
{
if (panelManager == null)
{
panelManager = Instantiate(panelManagerPrefab).GetComponent<PanelManager>();
}
if (audioManager == null)
{
audioManager = Instantiate(audioManagerPrefab).GetComponent<AudioManager>();
}
}
public void OnClickConfirmButton()
{

View File

@ -42,7 +42,7 @@ public class MainPanelManager : MonoBehaviour
UpdateMainPanelUI(GameManager.Instance.panelManager.OpenMainPanel);
// ScoreData.SetScore(userInfo.score);
GameManager.Instance.panelManager.OpenConfirmPanel(userInfo.nickname + "님" + "\n" + "자동 로그인 되었습니다", () => { });
// GameManager.Instance.panelManager.OpenConfirmPanel(userInfo.nickname + "님" + "\n" + "자동 로그인 되었습니다", () => { });
loadingPanelController.StopLoading();
}, () =>