修复问题,优化bug和游戏,resource资源拆迁
This commit is contained in:
@@ -77,15 +77,10 @@ public class SongButton : MonoBehaviour
|
||||
{
|
||||
Debug.Log("SetButtonData called, songID: " + songID);
|
||||
|
||||
SongData sd = null;
|
||||
if (SongDataLibrary.Instance != null)
|
||||
{
|
||||
sd = SongDataLibrary.Instance.GetSongDataByID(songID);
|
||||
}
|
||||
if (sd == null)
|
||||
{
|
||||
sd = thisSong_so as SongData;
|
||||
}
|
||||
SongData sd = thisSong_so as SongData;
|
||||
if (sd != null) sd.LoadPersistent();
|
||||
if (SongDataLibrary.Instance != null && SongDataLibrary.Instance.IsLoaded)
|
||||
sd = SongDataLibrary.Instance.GetSongDataByID(songID) ?? sd;
|
||||
if (sd != null)
|
||||
{
|
||||
if (songNameText != null) songNameText.text = sd.songName;
|
||||
@@ -205,7 +200,7 @@ public class SongButton : MonoBehaviour
|
||||
{
|
||||
Debug.Log("Song button clicked, song_songSerialID: " + song_songSerialID);
|
||||
SongData selectedSong = null;
|
||||
if (SongDataLibrary.Instance != null)
|
||||
if (SongDataLibrary.Instance != null && SongDataLibrary.Instance.IsLoaded)
|
||||
{
|
||||
selectedSong = SongDataLibrary.Instance.GetSongDataByID(song_songSerialID);
|
||||
}
|
||||
@@ -215,6 +210,7 @@ public class SongButton : MonoBehaviour
|
||||
}
|
||||
if (selectedSong != null)
|
||||
{
|
||||
selectedSong.LoadPersistent();
|
||||
selectedSong.GetAbsoluteHighestScore(out int bestTotal, out int bestDiff, out string bestDiffName);
|
||||
if (bestDiff >= 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user