private IEnumerator showRaceResults(TubeRaceEvents.EndGameResultsReceived results)
        {
            FinishScreen.SetActive(value: true);
            DefaultScreen.SetActive(value: false);
            List <long> sortedSessionIds = new List <long>(results.PlayerIdToPlacement.Keys);

            sortedSessionIds.Sort((long o1, long o2) => results.PlayerIdToPlacement[o1].CompareTo(results.PlayerIdToPlacement[o2]));
            for (int i = 0; i < LeaderBoardItems.Length; i++)
            {
                if (i < sortedSessionIds.Count)
                {
                    PartyGameSessionMessages.TubeRacePlayerResult resultBySessionId = getResultBySessionId(results.PlayerResults, sortedSessionIds[i]);
                    if (resultBySessionId != null)
                    {
                        LeaderBoardItems[i].SetData(sortedSessionIds[i], (int)resultBySessionId.OverallScore);
                        LeaderBoardItems[i].gameObject.SetActive(value: true);
                    }
                    else
                    {
                        LeaderBoardItems[i].gameObject.SetActive(value: false);
                    }
                }
                else
                {
                    LeaderBoardItems[i].gameObject.SetActive(value: false);
                }
            }
            yield return(new WaitForSeconds(TimeToShowFinishScreenInSeconds));

            showDefaultScreen();
        }
 private bool onEndGameResultsReceived(TubeRaceEvents.EndGameResultsReceived evt)
 {
     if (evt.PartyGameId == GameDefinition.Id && evt.PlayerResults.Count > 1)
     {
         CoroutineRunner.StopAllForOwner(this);
         CoroutineRunner.Start(showRaceResults(evt), this, "showFinishScreen");
     }
     return(false);
 }