修了很多bug和增加功能,优化不少问题

This commit is contained in:
2026-02-28 06:59:22 +08:00
parent 508a40bba0
commit e11cc1da7a
345 changed files with 173803 additions and 69332 deletions
@@ -21,6 +21,7 @@ public class NoteSpawner : MonoBehaviour
public GameObject[] holdNoteEndPrefabs;
public float spawnOffset = 0f; // Documentation text normalized.
public float static_value_add_to_spawnoffset = 0f;
[Header("Global timing adjustments")]
[Tooltip("Global additional realtime offset (seconds) added to hit times for all notes. Use to test input latency or adjust judgement timing. Default 0. Can be negative to make notes arrive earlier.")]
@@ -124,6 +125,12 @@ public class NoteSpawner : MonoBehaviour
private void Start()
{
// 读取 PlayerPrefs 中的延迟偏移值(秒)并应用
const string DELAY_PREFS_KEY = "UserGlobalDelaySeconds";
float savedDelay = PlayerPrefs.GetFloat(DELAY_PREFS_KEY, 0f);
spawnOffset = savedDelay + static_value_add_to_spawnoffset;
if (JudgeManager.IsDebugEnabled) Debug.Log($"[NoteSpawner] Applied spawnOffset={spawnOffset} (Saved={savedDelay} + Static={static_value_add_to_spawnoffset})");
// restore animations active state on Start
if (animations != null)
{