feat(ScreenGlitch): 完成基础的故障屏幕闪烁效果,并在重启时启用
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Core;
|
||||
using Script.Gameplay.Input;
|
||||
using UnityEngine;
|
||||
@@ -24,13 +25,16 @@ namespace Script.Gameplay.Global
|
||||
GameCountdownManager.Instance.StartLevelTimer();
|
||||
GameCountdownManager.Instance.OnFinish.AddListener(() =>
|
||||
{
|
||||
if (IsOpenRestartGameOnCountdownFinish) RestartGame();
|
||||
if (IsOpenRestartGameOnCountdownFinish)
|
||||
StartCoroutine(RestartGame());
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public void RestartGame()
|
||||
public IEnumerator RestartGame()
|
||||
{
|
||||
StartCoroutine(ScreenGlitchManager.Instance.TriggerGlitchEffect());
|
||||
yield return new WaitForSeconds(1.0f);
|
||||
GameManager.Instance.ReStartGame();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user