예제 #1
0
 public static void UpdateJoinButton()
 {
     //if (!Instance || !Instance.isActiveAndEnabled) { return; }
     if (!SteamAPI.IsHost() && SteamAPI.GetLobbyData().Screen == LobbyPacket.SCREEN_TYPE.MENU)
     {
         bodyText.text = "Waiting for host to select a song";
     }
     if (SteamAPI.GetLobbyData().Screen != LobbyPacket.SCREEN_TYPE.IN_GAME)
     {
         return;
     }
     bodyText.text = $"Currently playing {SteamAPI.GetSongName()} @ {Math.Floor(SteamAPI.GetSongOffset() / 60f)}:{Math.Floor(SteamAPI.GetSongOffset() % 60f)}";
     if (SteamAPI.GetLobbyData().CurrentSongOffset > 0f)
     {
         rejoin.interactable = true;
     }
     else
     {
         rejoin.interactable = false;
     }
 }