超大量的更新 修复很多问题,gameplay特效初步
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.IO;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections;
|
||||
@@ -186,7 +186,7 @@ public class GameManager : MonoBehaviour
|
||||
|
||||
if (musicSource == null) return;
|
||||
|
||||
// ✅ FIX: Force stop any existing playback before unmute
|
||||
// Documentation text normalized.
|
||||
try
|
||||
{
|
||||
musicSource.Stop();
|
||||
@@ -196,7 +196,7 @@ public class GameManager : MonoBehaviour
|
||||
|
||||
try
|
||||
{
|
||||
// ✅ FIX: Ensure unmuted BEFORE attempting to play
|
||||
// Documentation text normalized.
|
||||
musicSource.mute = false;
|
||||
Debug.Log("GameManager.PlayMusicWithDelay: musicSource unmuted");
|
||||
}
|
||||
@@ -251,7 +251,7 @@ public class GameManager : MonoBehaviour
|
||||
{
|
||||
try
|
||||
{
|
||||
// ✅ FIX: Double-check unmute before actual playback
|
||||
// Documentation text normalized.
|
||||
musicSource.mute = false;
|
||||
musicSource.time = 0f;
|
||||
musicSource.Play();
|
||||
@@ -330,7 +330,7 @@ public class GameManager : MonoBehaviour
|
||||
musicSource.mute = true;
|
||||
musicSource.Play();
|
||||
Debug.Log("GameManager: warmed up audio playback (muted)");
|
||||
// ✅ FIX: Stop immediately after warmup to avoid interference with later playback
|
||||
// Documentation text normalized.
|
||||
// Wait a frame to ensure audio system processes the Play command
|
||||
StartCoroutine(StopWarmupAfterFrame());
|
||||
}
|
||||
@@ -399,7 +399,7 @@ public class GameManager : MonoBehaviour
|
||||
try
|
||||
{
|
||||
musicSource.Stop();
|
||||
musicSource.mute = false; // ✅ Unmute immediately after warmup
|
||||
musicSource.mute = false; // Documentation text normalized.
|
||||
musicSource.time = 0f;
|
||||
Debug.Log("GameManager: warmup completed, audio stopped and unmuted");
|
||||
}
|
||||
@@ -620,7 +620,7 @@ public class GameManager : MonoBehaviour
|
||||
yield return null;
|
||||
Debug.Log("TestMode audio loaded into AudioSource");
|
||||
|
||||
// ✅ FIX: Stop immediately after warmup to avoid interference with later playback
|
||||
// Documentation text normalized.
|
||||
StartCoroutine(StopWarmupAfterFrame());
|
||||
|
||||
// After loading audio, enable overlay and pause via PauseManager
|
||||
|
||||
Reference in New Issue
Block a user