private void Start() { ScoreboardComponent scoreboard = PlayerInfo.Instance?.GetComponent <ScoreboardComponent>(); if (scoreboard) { Func <List <ScoreboardCore.Data.ScoreResult>, bool, bool> callbackB = (results, success) => { if (success) { List <UIScoreData> scoreData = ParseResultsData(results); AddLeaderboard("Highstrikes Raceway", scoreData); } return(true); }; Func <List <ScoreboardCore.Data.ScoreResult>, bool, bool> callbackC = (results, success) => { if (success) { List <UIScoreData> scoreData = ParseResultsData(results); AddLeaderboard("Hawkins Superhighway", scoreData); } return(true); }; scoreboard.GetHighscores(callbackB, "TrackB", true, 10); scoreboard.GetHighscores(callbackC, "TrackC", true, 10); } }
// Start is called before the first frame update void Start() { m_scoreboardComponent = GetComponent <ScoreboardComponent>(); m_playerStats = GameHelper.GetManager <StatsManager>(); m_playerName.Select(); m_scoreboardText.gameObject.SetActive(false); m_scoreboardTitleText.gameObject.SetActive(false); ShowScore(); LoadHighscores(); WWiseState.SetValue(); MyEvent.Post(gameObject); }