备份,准备做双端
This commit is contained in:
@@ -192,6 +192,14 @@ public class PauseManager : MonoBehaviour
|
||||
IsPaused = false;
|
||||
Time.timeScale = 1f;
|
||||
GameplayClock.Resume();
|
||||
|
||||
// Re-anchor clock to actual music progress to correct any drift during pause
|
||||
var gm = SceneObjectLookupCache.FindAny<GameManager>();
|
||||
if (gm != null && gm.musicSource != null && gm.musicSource.isPlaying)
|
||||
{
|
||||
GameplayClock.ReanchorToMusicTime(gm.musicSource.time);
|
||||
}
|
||||
|
||||
OnPauseStateChanged?.Invoke(false);
|
||||
ShowOverlayAnimated(false);
|
||||
}
|
||||
@@ -211,6 +219,14 @@ public class PauseManager : MonoBehaviour
|
||||
IsPaused = false;
|
||||
Time.timeScale = 1f;
|
||||
GameplayClock.Resume();
|
||||
|
||||
// Re-anchor clock to actual music progress to correct any drift during pause
|
||||
var gm = SceneObjectLookupCache.FindAny<GameManager>();
|
||||
if (gm != null && gm.musicSource != null && gm.musicSource.isPlaying)
|
||||
{
|
||||
GameplayClock.ReanchorToMusicTime(gm.musicSource.time);
|
||||
}
|
||||
|
||||
OnPauseStateChanged?.Invoke(false);
|
||||
|
||||
if (hideOverlay)
|
||||
|
||||
Reference in New Issue
Block a user