private void InitializeUI() { if (menuComponent == null) { menuComponent = SpawnUI <Menus.TopTimesGUI>(StringConstants.PrefabsTopTimes); } ShowUI(); menuComponent.LevelName.text = CommonData.gameWorld.worldMap.name; menuComponent.RecordNames.text = ""; menuComponent.RecordTimes.text = ""; foreach (TimeData timeData in DisplayTimes) { menuComponent.RecordNames.text += timeData.name + "\n"; menuComponent.RecordTimes.text += Utilities.StringHelper.FormatTime(timeData.time) + " s\n"; } }
private void InitializeUI() { if (menuComponent == null) { menuComponent = SpawnUI <Menus.TopTimesGUI>(StringConstants.PrefabsTopTimes); } var leaderboardController = LeaderboardController; leaderboardController.enabled = true; ShowUI(); menuComponent.RecordNames.text = ""; menuComponent.RecordTimes.text = ""; leaderboardController.AllScoreDataPath = TimeDataUtil.GetDBRankPath(CommonData.gameWorld.worldMap); if (leaderboardController.TopScores.Count > 0) { DisplayTimes = leaderboardController.TopScores; } leaderboardController.TopScoresUpdated += UpdateScores; leaderboardController.ScoreAdded += AddScore; menuComponent.LevelName.text = CommonData.gameWorld.worldMap.name; }