UI换了很多,spine主视觉停用
This commit is contained in:
@@ -9,7 +9,7 @@ using Bansonic;
|
||||
|
||||
public class selected_songInfo : MonoBehaviour
|
||||
{
|
||||
private const bool VerboseLogs = false;
|
||||
private static readonly bool VerboseLogs = false;
|
||||
[Header("ranking")]
|
||||
public Button rankingButton;
|
||||
public rankingList s_rl;
|
||||
@@ -541,7 +541,7 @@ public class selected_songInfo : MonoBehaviour
|
||||
else
|
||||
{
|
||||
// 鲁棒性处理:显示错误提示
|
||||
gNotice.error.display("暂无预览文件");
|
||||
gNotice.error.display(LocalizationService.Get("song.selected.no_preview", "暂无预览文件"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -799,7 +799,7 @@ public class selected_songInfo : MonoBehaviour
|
||||
}
|
||||
if (songNameText != null)
|
||||
{
|
||||
songNameText.text = "未选择歌曲";
|
||||
songNameText.text = LocalizationService.Get("song.selected.no_song", "未选择歌曲");
|
||||
}
|
||||
|
||||
// restore original difficulty button backgrounds and text colors
|
||||
@@ -1260,7 +1260,7 @@ public class selected_songInfo : MonoBehaviour
|
||||
if (chart == null)
|
||||
{
|
||||
Debug.LogError($"QuickEnter aborted: Song '{sd.songName}' has no chart file for difficulty {sd.thisLevel_selectedDifficultyID}.");
|
||||
gNotice.error.display("未找到此难度的关卡");
|
||||
gNotice.error.display(LocalizationService.Get("song.selected.difficulty_not_found", "未找到此难度的关卡"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1485,8 +1485,8 @@ public class selected_songInfo : MonoBehaviour
|
||||
}
|
||||
|
||||
// find managers in the new scene
|
||||
var beatmapManager = UnityEngine.Object.FindAnyObjectByType<BeatmapManager>();
|
||||
var gameManager = UnityEngine.Object.FindAnyObjectByType<GameManager>();
|
||||
var beatmapManager = SceneObjectLookupCache.FindAny<BeatmapManager>();
|
||||
var gameManager = SceneObjectLookupCache.FindAny<GameManager>();
|
||||
|
||||
LogVerbose($"selected song: {selected.songName} (id {selected.songID}), difficulty {selected.thisLevel_selectedDifficultyID}");
|
||||
|
||||
@@ -1600,7 +1600,7 @@ public class selected_songInfo : MonoBehaviour
|
||||
|
||||
// Start coroutine to wait for player input (Space) to begin playback and spawning
|
||||
// Use a safe host for coroutine in case this MonoBehaviour is destroyed unexpectedly
|
||||
var pauseMgr = PauseManager.Instance != null ? PauseManager.Instance : UnityEngine.Object.FindAnyObjectByType<PauseManager>();
|
||||
var pauseMgr = PauseManager.Instance != null ? PauseManager.Instance : SceneObjectLookupCache.FindAny<PauseManager>();
|
||||
MonoBehaviour coroutineHost = (pauseMgr as MonoBehaviour) ?? (gameManager as MonoBehaviour) ?? (beatmapManager as MonoBehaviour) ?? this;
|
||||
if (coroutineHost != null)
|
||||
{
|
||||
@@ -1650,7 +1650,7 @@ public class selected_songInfo : MonoBehaviour
|
||||
}
|
||||
|
||||
// Prewarm particle systems via AnimationController to avoid first-play hitch
|
||||
var anim = AnimationController.Global != null ? AnimationController.Global : UnityEngine.Object.FindAnyObjectByType<AnimationController>();
|
||||
var anim = AnimationController.Global != null ? AnimationController.Global : SceneObjectLookupCache.FindAny<AnimationController>();
|
||||
if (anim != null)
|
||||
{
|
||||
LogVerbose("Starting AnimationController particle prewarm (will wait until complete)...");
|
||||
@@ -1660,7 +1660,7 @@ public class selected_songInfo : MonoBehaviour
|
||||
}
|
||||
|
||||
// Unpause via PauseManager
|
||||
var pauseMgr = PauseManager.Instance != null ? PauseManager.Instance : UnityEngine.Object.FindAnyObjectByType<PauseManager>();
|
||||
var pauseMgr = PauseManager.Instance != null ? PauseManager.Instance : SceneObjectLookupCache.FindAny<PauseManager>();
|
||||
if (pauseMgr != null) pauseMgr.Pause(false);
|
||||
|
||||
// small buffer to avoid hitching immediately after unpause: wait configured delay from GameManager
|
||||
@@ -1717,7 +1717,7 @@ public class selected_songInfo : MonoBehaviour
|
||||
private void RequestPauseManagerPause()
|
||||
{
|
||||
if (pauseRequested) return;
|
||||
var pm = PauseManager.Instance != null ? PauseManager.Instance : UnityEngine.Object.FindAnyObjectByType<PauseManager>();
|
||||
var pm = PauseManager.Instance != null ? PauseManager.Instance : SceneObjectLookupCache.FindAny<PauseManager>();
|
||||
if (pm != null)
|
||||
{
|
||||
pm.Pause(true);
|
||||
|
||||
Reference in New Issue
Block a user