修复小问题 结算装了一点
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user