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

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

parent ce6000fc
......@@ -89,6 +89,9 @@ public class GameManager : SingletonBehaviour<GameManager>
}
public IEnumerator ClearStage()
{
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;
......@@ -103,6 +106,7 @@ public class GameManager : SingletonBehaviour<GameManager>
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