Commit f2bfc70a authored by 杨泽宇's avatar 杨泽宇

更新

parent 0e653859
......@@ -17,8 +17,6 @@ public class GameSystem : SingletonBase<GameSystem>
public GameObject PauseUI;
[Tooltip("暂停后处理")]
public GameObject PausePostProcessing;
[Tooltip("主摄像机后处理")]
public GameObject MainPostProcessing;
[Tooltip("当前剩余时间")]
private float currentTime;
......@@ -107,14 +105,21 @@ public class GameSystem : SingletonBase<GameSystem>
/// 暂停游戏
/// </summary>
public void PauseGame()
{
StartCoroutine(PauseGameCoroutine());
}
private IEnumerator PauseGameCoroutine()
{
PausePostProcessing.SetActive(true);
MainPostProcessing.SetActive(false);
yield return new WaitForSeconds(1f);
Time.timeScale = 0f;
isPauseGame = true;
PauseUI.SetActive(true);
}
/// <summary>
/// 暂停游戏
/// </summary>
......@@ -136,7 +141,6 @@ public class GameSystem : SingletonBase<GameSystem>
public void ResumeGame()
{
PausePostProcessing.SetActive(false);
MainPostProcessing.SetActive(true);
Time.timeScale = 1f;
isPauseGame = false;
PauseUI.SetActive(false);
......
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