成就系统 巨大修改 新的ui 黑白效果 等一堆

This commit is contained in:
FloatGaming
2026-01-23 18:43:23 +08:00
parent f3ece026ca
commit 0e47864569
256 changed files with 134131 additions and 31192 deletions
+40 -6
View File
@@ -11,8 +11,14 @@ public class NotePool : MonoBehaviour
public GameObject[] holdNotePrefabs; // ƬԤ
public GameObject[] holdNoteEndPrefabs; // βרóԤѡ
public GameObject[] startNotePrefabs; // startƬԤ
private int poolSize = 24; // ÿ͵شС (increased)
private int maxPoolSize = 120; // ص (increased)
[Header("Pool Size")]
public int poolSize = 24;
public int maxPoolSize = 300;
[Tooltip("Multiplier for hold segment pool size (per color).")]
public int holdSegmentPoolMultiplier = 8;
[Tooltip("Multiplier for hold end pool size (per color).")]
public int holdEndPoolMultiplier = 8;
// ɫĿӳÿ switch
private Dictionary<string, int> colorIndexMap;
@@ -118,10 +124,10 @@ public class NotePool : MonoBehaviour
private IEnumerator PrewarmCoroutine(int colorCount)
{
// Calculate targets
int noteTarget = poolSize; // per color
int startTarget = poolSize;
int holdTarget = poolSize * 5;
int endTarget = poolSize * 5;
int noteTarget = Mathf.Min(poolSize, maxPoolSize); // per color
int startTarget = Mathf.Min(poolSize, maxPoolSize);
int holdTarget = Mathf.Min(poolSize * Mathf.Max(1, holdSegmentPoolMultiplier), maxPoolSize);
int endTarget = Mathf.Min(poolSize * Mathf.Max(1, holdEndPoolMultiplier), maxPoolSize);
while (true)
{
@@ -237,6 +243,34 @@ public class NotePool : MonoBehaviour
{
if (obj == null || pool == null) return; // ֹ
// Defensive: unregister/unlock any TrackKeyManager state referencing this object to avoid stale queues/locks
try
{
// Try to determine track index from Note or HoldNote components
int trackIdx = -1;
var noteComp = obj.GetComponent<Note>();
if (noteComp != null)
{
trackIdx = noteComp.GetTrackIndex();
}
else
{
var holdComp = obj.GetComponent<HoldNote>();
if (holdComp != null)
{
trackIdx = holdComp.trackIndex;
}
}
string id = obj.GetInstanceID().ToString();
if (TrackKeyManager.Instance != null && trackIdx >= 0)
{
try { TrackKeyManager.Instance.UnregisterKey(trackIdx, id); } catch { }
try { TrackKeyManager.Instance.UnlockTrackForJudge(trackIdx, id); } catch { }
}
}
catch { }
// ظڳڣֱӺ
GamePlay.PoolItem pi = obj.GetComponent<GamePlay.PoolItem>();
if (pi != null && pi.inPool) return;