Commit 81c4870a authored by 18신대성's avatar 18신대성

메뉴버튼, 리셋버튼 UI 적용

parent 0e845955
This diff is collapsed.
...@@ -27,9 +27,7 @@ public class CameraTurret : MonoBehaviour, IObject, IBreakable, IPlayerInteracto ...@@ -27,9 +27,7 @@ public class CameraTurret : MonoBehaviour, IObject, IBreakable, IPlayerInteracto
{ {
if (Position.IsInAdjacentArea(pos, 1) && MapManager.inst.currentMap.GetWallAtPos((Vector2)(Position + pos) / 2) == null) if (Position.IsInAdjacentArea(pos, 1) && MapManager.inst.currentMap.GetWallAtPos((Vector2)(Position + pos) / 2) == null)
{ {
GameManager.inst.isGameOver = true; GameManager.inst.GameOver();
StartCoroutine(GameManager.inst.RestartStage());
GameManager.inst.uiGenerator.ResetAllClearUIs();
//TODO : Restart Level //TODO : Restart Level
} }
} }
......
...@@ -59,6 +59,7 @@ public class GameManager : SingletonBehaviour<GameManager> ...@@ -59,6 +59,7 @@ public class GameManager : SingletonBehaviour<GameManager>
IEnumerator Whiteout(bool goToWhite) IEnumerator Whiteout(bool goToWhite)
{ {
whiteout.gameObject.SetActive(true);
float setTime = 0.2f; float setTime = 0.2f;
float resetTime = 1.5f; float resetTime = 1.5f;
if (goToWhite) if (goToWhite)
...@@ -78,6 +79,7 @@ public class GameManager : SingletonBehaviour<GameManager> ...@@ -78,6 +79,7 @@ public class GameManager : SingletonBehaviour<GameManager>
yield return null; yield return null;
} }
whiteout.color = new Color(1, 1, 1, 0); whiteout.color = new Color(1, 1, 1, 0);
whiteout.gameObject.SetActive(false);
} }
} }
...@@ -95,7 +97,10 @@ public class GameManager : SingletonBehaviour<GameManager> ...@@ -95,7 +97,10 @@ public class GameManager : SingletonBehaviour<GameManager>
public void GameOver() public void GameOver()
{ {
Debug.Log("Game Over!"); Debug.Log("Game Over!");
isGameOver = true;
StopAllCoroutines(); StopAllCoroutines();
StartCoroutine(RestartStage());
uiGenerator.ResetAllClearUIs();
} }
public IEnumerator RestartStage() public IEnumerator RestartStage()
......
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