Commit 5cbb69b2 authored by 18신대성's avatar 18신대성

not clear -> clear -> not clear로 스쳐갈때 클리어되어버리는 문제 해결

parent ce6000fc
......@@ -90,18 +90,22 @@ public class GameManager : SingletonBehaviour<GameManager>
public IEnumerator ClearStage()
{
if (isPlayerShooting) yield return StartCoroutine(Camera.main.gameObject.GetComponent<CameraController>().ZoomOutFromPlayer(PlayerController.inst.currentPlayer));
yield return null;
clearUINextText.text = StageSelector.nextStage.Replace("_", " - ");
clearUI.SetActive(true);
buttonUIs.SetActive(false);
Debug.Log("Stage Clear!");
Cursor.visible = true;
Cursor.lockState = CursorLockMode.None;
isGameOver = true;
StageSelector.inst.SaveClearData(stageStrIdx, true);
yield return new WaitForSeconds(0.1f);
if (clearCounter == 0)
{
if (isPlayerShooting) yield return StartCoroutine(Camera.main.gameObject.GetComponent<CameraController>().ZoomOutFromPlayer(PlayerController.inst.currentPlayer));
yield return null;
clearUINextText.text = StageSelector.nextStage.Replace("_", " - ");
clearUI.SetActive(true);
buttonUIs.SetActive(false);
Debug.Log("Stage Clear!");
Cursor.visible = true;
Cursor.lockState = CursorLockMode.None;
isGameOver = true;
StageSelector.inst.SaveClearData(stageStrIdx, true);
}
}
public void GameOver(bool onlyRestart = false)
......
......@@ -28,7 +28,7 @@ public class ClearCondition
{
GameManager.inst.clearCounter--;
isDone = true;
//Debug.Log(GameManager.inst.clearCounter);
//Debug.Log(GameManager.inst.clearCounter)
if (GameManager.inst.clearCounter == 0)
GameManager.inst.StartCoroutine(GameManager.inst.ClearStage());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment