From 921479fee6e7f043a6b395ac3e1e0e531a9e325b Mon Sep 17 00:00:00 2001 From: Ino Date: Fri, 23 May 2025 15:46:39 +0900 Subject: [PATCH] ... --- Assets/Script/Mgr/TimeMgr.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/Script/Mgr/TimeMgr.cs b/Assets/Script/Mgr/TimeMgr.cs index e9add92e8..9363e7d3e 100644 --- a/Assets/Script/Mgr/TimeMgr.cs +++ b/Assets/Script/Mgr/TimeMgr.cs @@ -10,10 +10,11 @@ public class TimeMgr : MonoBehaviourSingletonTemplate public void Set_TimeScale(float delaytime, float _timescale) { - StartCoroutine(Run_Coroutine(delaytime, _timescale)); + StopCoroutine(nameof(Run_TimeScale)); + StartCoroutine(Run_TimeScale(delaytime, _timescale)); } - IEnumerator Run_Coroutine(float delaytime, float _timescale) + IEnumerator Run_TimeScale(float delaytime, float _timescale) { Time.timeScale = _timescale; yield return new WaitForSeconds(delaytime);