特效新内容。修复gameplay致命bug和分数保存bug

This commit is contained in:
FloatGaming
2026-02-16 01:55:18 +08:00
parent 3a7a0b4669
commit 9f7c1c57b7
206 changed files with 112684 additions and 857 deletions
@@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
using System.Collections;
@@ -105,36 +105,26 @@ public class SongButton : MonoBehaviour
songOverallDescriptionText.text = string.IsNullOrEmpty(sd.thisLevel_overallDescription) ? "" : sd.thisLevel_overallDescription;
}
// Documentation text normalized.
int bestTotal = 0;
int bestDiff = -1;
string bestDiffName = "";
sd.GetAbsoluteHighestScore(out bestTotal, out bestDiff, out bestDiffName);
sd.GetAbsoluteHighestScore(out int bestTotal, out int bestDiff, out string bestDiffName);
if (bestTotal < 0) bestTotal = 0;
if (highestScoreText != null) highestScoreText.text = bestTotal.ToString();
// Documentation text normalized.
if (highestScoreDifficultyText != null)
{
highestScoreDifficultyText.text = string.IsNullOrEmpty(bestDiffName) ? "" : "(" + bestDiffName + ")";
}
// Assign scoreLevelImage based on thresholds relative to 2,000,000
if (scoreLevelImage != null)
{
Sprite chosenSprite = null;
Sprite chosenSprite;
float baseScore = 2000000f;
// Documentation text normalized.
if (bestTotal <= 0)
{
chosenSprite = ufSprite;
}
else
{
// Evaluate from top to bottom thresholds
if (bestTotal >= baseScore * easePercent && easeSprite != null)
chosenSprite = easeSprite;
else if (bestTotal >= baseScore * ssPercent && ssSprite != null)
@@ -225,10 +215,7 @@ public class SongButton : MonoBehaviour
}
if (selectedSong != null)
{
int bestTotal = 0;
int bestDiff = -1;
string bestDiffName = "";
selectedSong.GetAbsoluteHighestScore(out bestTotal, out bestDiff, out bestDiffName);
selectedSong.GetAbsoluteHighestScore(out int bestTotal, out int bestDiff, out string bestDiffName);
if (bestDiff >= 0)
{
selectedSong.thisLevel_selectedDifficultyID = bestDiff;