UI换了很多,spine主视觉停用
This commit is contained in:
@@ -6,7 +6,7 @@ using TMPro;
|
||||
|
||||
public class BeatmapManager : MonoBehaviour
|
||||
{
|
||||
private const bool VerboseLogs = false;
|
||||
private static readonly bool VerboseLogs = false;
|
||||
public static BeatmapManager Instance { get; private set; }
|
||||
|
||||
private void Awake()
|
||||
@@ -339,7 +339,7 @@ public class BeatmapManager : MonoBehaviour
|
||||
if (VerboseLogs) Debug.Log("BeatmapManager.Start: chart parsed from SongData, attempting to assign audio and pause system");
|
||||
|
||||
// try to assign audio to GameManager.musicSource
|
||||
var gm = FindAnyObjectByType<GameManager>();
|
||||
var gm = SceneObjectLookupCache.FindAny<GameManager>();
|
||||
if (gm != null && gm.musicSource != null)
|
||||
{
|
||||
if (assignedSongData != null && assignedSongData.audioFile != null)
|
||||
@@ -406,18 +406,18 @@ public class BeatmapManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Pause the system to show pause overlay (PauseManager will enable overlayRoot)
|
||||
var pauseMgr = PauseManager.Instance ?? FindAnyObjectByType<PauseManager>();
|
||||
if (pauseMgr != null)
|
||||
{
|
||||
pauseMgr.Pause(true);
|
||||
// Pause the system to show pause overlay (PauseManager will enable overlayRoot)
|
||||
var pauseMgr = PauseManager.Instance ?? SceneObjectLookupCache.FindAny<PauseManager>();
|
||||
if (pauseMgr != null)
|
||||
{
|
||||
pauseMgr.Pause(true);
|
||||
if (VerboseLogs) Debug.Log("System paused after loading chart and audio to allow player to start");
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
if (VerboseLogs) Debug.Log("PauseManager not found in scene; cannot pause system automatically");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// clear pending so it doesn't run again
|
||||
pendingSongData = null;
|
||||
@@ -895,7 +895,7 @@ public class BeatmapManager : MonoBehaviour
|
||||
go = ui.GetAllyObjectBySlot(slotIndex);
|
||||
if (go == null)
|
||||
{
|
||||
var byName = GameObject.Find($"ally_0{slotIndex + 1}");
|
||||
var byName = SceneObjectLookupCache.Find($"ally_0{slotIndex + 1}");
|
||||
if (byName != null) go = byName;
|
||||
}
|
||||
if (go == null) return null;
|
||||
|
||||
Reference in New Issue
Block a user