Merge pull request #42 from Degulleo/DO-50-중간-영상-제출-후-버그-수정
DO-50 [FIX] 오디오 매니저 버그 등 수정
This commit is contained in:
commit
e5bfed2ea9
@ -2,6 +2,7 @@ using System;
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
public abstract class BasePlayerState
|
public abstract class BasePlayerState
|
||||||
{
|
{
|
||||||
@ -19,9 +20,11 @@ public abstract class BasePlayerState
|
|||||||
|
|
||||||
if (gameLogic.CheckGameWin(playerType, row, col))
|
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);
|
var gameResult = playerType == Enums.PlayerType.PlayerA? Enums.GameResult.Win:Enums.GameResult.Lose;
|
||||||
|
gameLogic.EndGame(gameResult);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -29,8 +32,10 @@ public abstract class BasePlayerState
|
|||||||
{
|
{
|
||||||
if (gameLogic.CheckGameDraw())
|
if (gameLogic.CheckGameDraw())
|
||||||
{
|
{
|
||||||
GameManager.Instance.panelManager.OpenConfirmPanel($"Game Over: Draw",() =>{});
|
GameManager.Instance.panelManager.OpenConfirmPanel($"Game Over: Draw", () =>
|
||||||
gameLogic.EndGame(Enums.GameResult.Draw);
|
{
|
||||||
|
gameLogic.EndGame(Enums.GameResult.Draw);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -347,6 +352,7 @@ public class GameLogic : MonoBehaviour
|
|||||||
SetState(null);
|
SetState(null);
|
||||||
ReplayManager.Instance.SaveReplayDataResult(result);
|
ReplayManager.Instance.SaveReplayDataResult(result);
|
||||||
//TODO: 게임 종료 후 행동 구현
|
//TODO: 게임 종료 후 행동 구현
|
||||||
|
SceneManager.LoadScene("Main");
|
||||||
}
|
}
|
||||||
|
|
||||||
//승리 확인 함수
|
//승리 확인 함수
|
||||||
|
@ -38,8 +38,14 @@ public class GameManager : Singleton<GameManager>
|
|||||||
|
|
||||||
private void InitPanels()
|
private void InitPanels()
|
||||||
{
|
{
|
||||||
panelManager = Instantiate(panelManagerPrefab).GetComponent<PanelManager>();
|
if (panelManager == null)
|
||||||
audioManager = Instantiate(audioManagerPrefab).GetComponent<AudioManager>();
|
{
|
||||||
|
panelManager = Instantiate(panelManagerPrefab).GetComponent<PanelManager>();
|
||||||
|
}
|
||||||
|
if (audioManager == null)
|
||||||
|
{
|
||||||
|
audioManager = Instantiate(audioManagerPrefab).GetComponent<AudioManager>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnClickConfirmButton()
|
public void OnClickConfirmButton()
|
||||||
|
@ -42,7 +42,7 @@ public class MainPanelManager : MonoBehaviour
|
|||||||
|
|
||||||
UpdateMainPanelUI(GameManager.Instance.panelManager.OpenMainPanel);
|
UpdateMainPanelUI(GameManager.Instance.panelManager.OpenMainPanel);
|
||||||
// ScoreData.SetScore(userInfo.score);
|
// ScoreData.SetScore(userInfo.score);
|
||||||
GameManager.Instance.panelManager.OpenConfirmPanel(userInfo.nickname + "님" + "\n" + "자동 로그인 되었습니다", () => { });
|
// GameManager.Instance.panelManager.OpenConfirmPanel(userInfo.nickname + "님" + "\n" + "자동 로그인 되었습니다", () => { });
|
||||||
|
|
||||||
loadingPanelController.StopLoading();
|
loadingPanelController.StopLoading();
|
||||||
}, () =>
|
}, () =>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user