很多更新,服务端连接,新UI和系统
This commit is contained in:
@@ -9,6 +9,10 @@ using Bansonic;
|
||||
|
||||
public class selected_songInfo : MonoBehaviour
|
||||
{
|
||||
[Header("ranking")]
|
||||
public Button rankingButton;
|
||||
public rankingList s_rl;
|
||||
|
||||
[Header("Music Controls")]
|
||||
public Button playpausebutton;
|
||||
public Button stopbutton;
|
||||
@@ -270,6 +274,17 @@ public class selected_songInfo : MonoBehaviour
|
||||
LogVerbose("quickEnter_gamePlay is null in OnEnable");
|
||||
}
|
||||
|
||||
if (rankingButton != null)
|
||||
{
|
||||
rankingButton.onClick.RemoveListener(OnRankingButtonClicked);
|
||||
rankingButton.onClick.AddListener(OnRankingButtonClicked);
|
||||
LogVerbose("rankingButton listener added");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogVerbose("rankingButton is null in OnEnable");
|
||||
}
|
||||
|
||||
BindPromptButtons();
|
||||
}
|
||||
|
||||
@@ -287,6 +302,10 @@ public class selected_songInfo : MonoBehaviour
|
||||
{
|
||||
quickEnter_gamePlay.onClick.RemoveListener(OnQuickEnterClicked);
|
||||
}
|
||||
if (rankingButton != null)
|
||||
{
|
||||
rankingButton.onClick.RemoveListener(OnRankingButtonClicked);
|
||||
}
|
||||
|
||||
UnbindPromptButtons();
|
||||
_promptAwaitingChoice = false;
|
||||
@@ -365,6 +384,35 @@ public class selected_songInfo : MonoBehaviour
|
||||
LogVerbose($"selected_songInfo.Start: SongDataHolder.SelectedSongData is {(SongDataHolder.SelectedSongData == null ? "NULL" : SongDataHolder.SelectedSongData.songName)}");
|
||||
}
|
||||
|
||||
private SongData GetCurrentSelectedSong()
|
||||
{
|
||||
if (SongDataHolder.SelectedSongData != null)
|
||||
{
|
||||
return SongDataHolder.SelectedSongData;
|
||||
}
|
||||
|
||||
LogVerbose("GetCurrentSelectedSong: SongDataHolder.SelectedSongData is null");
|
||||
return null;
|
||||
}
|
||||
|
||||
public void OnRankingButtonClicked()
|
||||
{
|
||||
SongData song = GetCurrentSelectedSong();
|
||||
if (song == null)
|
||||
{
|
||||
Debug.LogWarning("[selected_songInfo] Ranking button clicked, but no song is currently selected.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (s_rl == null)
|
||||
{
|
||||
Debug.LogWarning("[selected_songInfo] Ranking button clicked, but rankingList reference is missing.");
|
||||
return;
|
||||
}
|
||||
|
||||
s_rl.Open(song.songID.ToString(), song.songName);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
UpdateMusicPlaybackProgress();
|
||||
|
||||
Reference in New Issue
Block a user