技能主要更新,修复卡顿并加入动画,以及各种其他更新。

This commit is contained in:
FloatGaming
2026-02-07 21:05:17 +08:00
parent abeca51be5
commit 1ac3cd0104
1349 changed files with 1526749 additions and 24850 deletions
@@ -77,7 +77,15 @@ public class SongButton : MonoBehaviour
{
Debug.Log("SetButtonData called, songID: " + songID);
var sd = SongDataLibrary.Instance != null ? SongDataLibrary.Instance.GetSongDataByID(songID) : null;
SongData sd = null;
if (SongDataLibrary.Instance != null)
{
sd = SongDataLibrary.Instance.GetSongDataByID(songID);
}
if (sd == null)
{
sd = thisSong_so as SongData;
}
if (sd != null)
{
if (songNameText != null) songNameText.text = sd.songName;
@@ -206,9 +214,25 @@ public class SongButton : MonoBehaviour
public void OnSongButtonClick()
{
Debug.Log("Song button clicked, song_songSerialID: " + song_songSerialID);
SongData selectedSong = SongDataLibrary.Instance.GetSongDataByID(song_songSerialID);
SongData selectedSong = null;
if (SongDataLibrary.Instance != null)
{
selectedSong = SongDataLibrary.Instance.GetSongDataByID(song_songSerialID);
}
if (selectedSong == null)
{
selectedSong = thisSong_so as SongData;
}
if (selectedSong != null)
{
int bestTotal = 0;
int bestDiff = -1;
string bestDiffName = "";
selectedSong.GetAbsoluteHighestScore(out bestTotal, out bestDiff, out bestDiffName);
if (bestDiff >= 0)
{
selectedSong.thisLevel_selectedDifficultyID = bestDiff;
}
if (currentSelected != null && currentSelected != this)
{
currentSelected.FadeOutSelectedBorder();
@@ -217,7 +241,7 @@ public class SongButton : MonoBehaviour
FadeInSelectedBorder();
SongDataHolder.SelectedSongData = selectedSong;
var selectedInfo = FindObjectOfType<selected_songInfo>();
var selectedInfo = Object.FindAnyObjectByType<selected_songInfo>();
if (selectedInfo != null)
{
selectedInfo.UpdateSelectedSongDisplay();