加入了浮动小游戏功能和设置界面

运行时请手动修改运行库目录fdBrowser
This commit is contained in:
FloatGaming
2025-12-24 06:02:06 +08:00
parent 1ab80e504e
commit eb9b6ba78a
1131 changed files with 148096 additions and 313 deletions
+22 -20
View File
@@ -209,7 +209,7 @@ public class HoldNote : BaseNote
{
Debug.Log($"[HoldNote] START段超时自动Miss(自动): {noteColor}");
// 只做 Miss 结果展示与登记
// register as missed
JudgeManager.Instance.RegisterStartJudged(noteID, false);
InputManager.Instance?.ShowJudgeResult(trackIndex, "Miss");
@@ -255,7 +255,7 @@ public class HoldNote : BaseNote
float maxWindow = (judgeConfig?.missRange ?? 0.5f) * holdWindowMultiplier;
if (Mathf.Abs(pressTimeLocal - hitTime) <= maxWindow)
{
HandleStart();
HandleStart(false);
isJudged = true; // mark judged to avoid duplicates
}
else
@@ -269,7 +269,7 @@ public class HoldNote : BaseNote
// legacy fallback (shouldn't normally hit because above handles Start)
if (Input.GetKeyDown(keyToPress))
{
HandleStart();
HandleStart(false);
isJudged = true; // 无论成功失败都标记为已判定,避免重复尝试
}
}
@@ -348,7 +348,7 @@ public class HoldNote : BaseNote
{
Debug.Log($"[HoldNote] Start段离开判定线未判定,补偿 Miss 并回收: {noteColor}");
// 确保未判定的 Start 段在离开判定线时登记为 Miss
HandleStart();
HandleStart(true);
isJudged = true;
ReturnToPool();
}
@@ -422,44 +422,52 @@ public class HoldNote : BaseNote
}
}
private void HandleStart()
private void HandleStart(bool forceMiss = false)
{
if (!JudgeManager.Instance.TryResolveStart(noteID))
{
Debug.Log($"[HoldNote] START 已被判定,跳过: {noteColor}");
return;
}
// If forced miss (e.g. leaving judge zone without press), register miss immediately
if (forceMiss)
{
Debug.Log($"[HoldNote] START 强制 Miss (未按下): {noteColor}");
ScoreManager.Instance.countMiss += 1;
JudgeManager.Instance.RegisterStartJudged(noteID, false);
isHoldActive = false;
InputManager.Instance?.ShowJudgeResult(trackIndex, "Miss");
JudgeSoundManager.Instance?.PlayJudgeSound("Miss");
teamUIController.Instance?.OnJudgeResult("Miss");
return;
}
float pressTime = Time.time;
float rawOffsetMs = (hitTime - pressTime) * 1000f;
float offset = Mathf.Abs(pressTime - hitTime);
string result;
// compute scaled judgement windows for hold note start
// further scale windows according to visualSpeedMultiplier so slow visuals get more leniency
float visualScaleFactor = Mathf.Clamp(visualSpeedMultiplier, 0.5f, 2f);
float pRange = (judgeConfig?.perfectRange ?? 0.1f) * holdWindowMultiplier * visualScaleFactor;
float gRange = (judgeConfig?.greatRange ?? 0.2f) * holdWindowMultiplier * visualScaleFactor;
float gdRange = (judgeConfig?.goodRange ?? 0.3f) * holdWindowMultiplier * visualScaleFactor;
// evaluate Start judgement using scaled windows
if (offset <= pRange)
{
result = "Perfect";
ScoreManager.Instance.countPerfect += 1;
if (noteData != null) noteData.judgeOffsetMs = rawOffsetMs;
Debug.Log($"[HoldNote] START判定成功(偏差={offset:F2}秒): {noteColor}");
JudgeManager.Instance.RegisterStartJudged(noteID, true);
isHoldActive = true; // 成功判定Start,长按状态激活
isHoldActive = true;
PlayHitAnimation();
AnimationController.Global?.StartHoldParticles(noteColor);
// Trigger skills ... (unchanged)
}
else if (offset <= gRange)
{
result = "Great";
ScoreManager.Instance.countGreat += 1;
if (noteData != null) noteData.judgeOffsetMs = rawOffsetMs;
Debug.Log($"[HoldNote] START判定 Great(偏差={offset:F2}秒): {noteColor}");
JudgeManager.Instance.RegisterStartJudged(noteID, true);
isHoldActive = true;
PlayHitAnimation();
@@ -470,7 +478,6 @@ public class HoldNote : BaseNote
result = "Good";
ScoreManager.Instance.countGood += 1;
if (noteData != null) noteData.judgeOffsetMs = rawOffsetMs;
Debug.Log($"[HoldNote] START判定 Good(偏差={offset:F2}秒): {noteColor}");
JudgeManager.Instance.RegisterStartJudged(noteID, true);
isHoldActive = true;
PlayHitAnimation();
@@ -479,14 +486,9 @@ public class HoldNote : BaseNote
else
{
result = "Miss";
if (JudgeManager.Instance.TryResolveStart(noteID))
{
ScoreManager.Instance.countMiss += 1;
}
Debug.Log($"[HoldNote] START Miss(偏差={offset:F2}秒): {noteColor}");
ScoreManager.Instance.countMiss += 1;
JudgeManager.Instance.RegisterStartJudged(noteID, false);
isHoldActive = false;
try
{
bool triggered = SkillBuilder.Instance?.NotifyNoteHit(this.trackIndex, result, SkillDefinition.NoteTypeTrigger.Tap, this.noteID) ?? false;