加入很多新内容,这波一块交了
This commit is contained in:
@@ -99,6 +99,18 @@ public class HoldNote : BaseNote
|
||||
return beatmapManagerCache;
|
||||
}
|
||||
|
||||
public static void PrewarmRuntimeCaches()
|
||||
{
|
||||
GetBeatmapManagerCached();
|
||||
if (allyCache == null || allyCache.Length < 10)
|
||||
allyCache = new AllyCombatant[10];
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
GetAllyForTrackCached(i);
|
||||
}
|
||||
}
|
||||
|
||||
private static float JudgeToPmMultiplier(string judgeResult)
|
||||
{
|
||||
switch (judgeResult)
|
||||
@@ -326,9 +338,10 @@ public class HoldNote : BaseNote
|
||||
}
|
||||
|
||||
private float cachedTravelTime = 1.0f; // Cached travel time for distance optimization
|
||||
private bool isSyncNote;
|
||||
|
||||
public void Setup(int id, int trackIndex, float speed, float time, float delay,
|
||||
bool isEnd, float scheduledEnd, string color, KeyCode key, string type, float travelTimeSeconds, NoteJudgeConfig judgeConfig, NoteData noteData)
|
||||
bool isEnd, float scheduledEnd, string color, KeyCode key, string type, float travelTimeSeconds, NoteJudgeConfig judgeConfig, NoteData noteData, bool isSync = false)
|
||||
{
|
||||
this.id = id;
|
||||
// Ensure singletons are up to date if they were re-initialized (e.g. on scene reload)
|
||||
@@ -347,6 +360,7 @@ public class HoldNote : BaseNote
|
||||
this.key = key;
|
||||
this.type = type;
|
||||
this.judgeConfig = judgeConfig;
|
||||
this.isSyncNote = isSync;
|
||||
|
||||
this.noteID = id.ToString();
|
||||
this.keyToPress = key;
|
||||
@@ -659,6 +673,13 @@ public class HoldNote : BaseNote
|
||||
InputManager.Instance?.ShowJudgeResult(trackIndex, result);
|
||||
teamUIController.Instance?.OnJudgeResult(result);
|
||||
JudgeSoundManager.Instance?.PlayJudgeSound(result);
|
||||
|
||||
if (isSyncNote)
|
||||
{
|
||||
effectEventController.TryTriggerMultiNoteShake();
|
||||
}
|
||||
|
||||
globalNoteEffect.TryTrigger(noteData != null ? noteData.noteFunction : null);
|
||||
}
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D collision)
|
||||
@@ -975,6 +996,16 @@ public class HoldNote : BaseNote
|
||||
{
|
||||
ScheduleReturnToPool(0.2f);
|
||||
}
|
||||
|
||||
if (segment == NoteSegment.Start && isSyncNote && result != "Miss")
|
||||
{
|
||||
effectEventController.TryTriggerMultiNoteShake();
|
||||
}
|
||||
|
||||
if (segment == NoteSegment.Start && result != "Miss")
|
||||
{
|
||||
globalNoteEffect.TryTrigger(noteData != null ? noteData.noteFunction : null);
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator DelayedReturn()
|
||||
|
||||
Reference in New Issue
Block a user