修复小问题 结算装了一点

This commit is contained in:
FloatGaming
2026-01-14 10:02:45 +08:00
parent 2f9d4aae0c
commit 271a576289
15 changed files with 48793 additions and 850 deletions
+9 -1
View File
@@ -123,6 +123,9 @@ public class ScoreManager : MonoBehaviour
}
// Optionally update any UI for pm sums here if teamUIController exposes fields (not implemented by default)
// Ensure total is recalculated when pm/idol aggregates change so totalScore reflects pm + idol
RecalculateTotal();
}
public void RecalculateTotal()
@@ -148,7 +151,12 @@ public class ScoreManager : MonoBehaviour
sum += currents[i - 1];
}
totalScore = sum;
// totalScore should include both pm (per-note) and idol aggregates maintained by ScoreManager
long combined = (long)allSum_pmScore + (long)allSum_idolScore;
// clamp to int range
totalScore = (int)Mathf.Min((float)combined, (float)int.MaxValue - 1f);
// update UI if available
if (teamUIController.Instance != null)
{