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

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

parent ce6000fc
...@@ -90,18 +90,22 @@ public class GameManager : SingletonBehaviour<GameManager> ...@@ -90,18 +90,22 @@ public class GameManager : SingletonBehaviour<GameManager>
public IEnumerator ClearStage() public IEnumerator ClearStage()
{ {
if (isPlayerShooting) yield return StartCoroutine(Camera.main.gameObject.GetComponent<CameraController>().ZoomOutFromPlayer(PlayerController.inst.currentPlayer)); yield return new WaitForSeconds(0.1f);
yield return null; if (clearCounter == 0)
clearUINextText.text = StageSelector.nextStage.Replace("_", " - "); {
clearUI.SetActive(true); if (isPlayerShooting) yield return StartCoroutine(Camera.main.gameObject.GetComponent<CameraController>().ZoomOutFromPlayer(PlayerController.inst.currentPlayer));
buttonUIs.SetActive(false); yield return null;
Debug.Log("Stage Clear!"); clearUINextText.text = StageSelector.nextStage.Replace("_", " - ");
clearUI.SetActive(true);
Cursor.visible = true; buttonUIs.SetActive(false);
Cursor.lockState = CursorLockMode.None; Debug.Log("Stage Clear!");
isGameOver = true; Cursor.visible = true;
StageSelector.inst.SaveClearData(stageStrIdx, true); Cursor.lockState = CursorLockMode.None;
isGameOver = true;
StageSelector.inst.SaveClearData(stageStrIdx, true);
}
} }
public void GameOver(bool onlyRestart = false) public void GameOver(bool onlyRestart = false)
......
...@@ -28,7 +28,7 @@ public class ClearCondition ...@@ -28,7 +28,7 @@ public class ClearCondition
{ {
GameManager.inst.clearCounter--; GameManager.inst.clearCounter--;
isDone = true; isDone = true;
//Debug.Log(GameManager.inst.clearCounter); //Debug.Log(GameManager.inst.clearCounter)
if (GameManager.inst.clearCounter == 0) if (GameManager.inst.clearCounter == 0)
GameManager.inst.StartCoroutine(GameManager.inst.ClearStage()); 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