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