public void UpdateTexts(LevelData levelData, long yourTime) { LevelTitle.text = "Level " + levelData.name.ToString().Split('_')[1]; Coins.text = string.Format("{0:00} / {1:00}", levelData.CoinsCollected, levelData.TotalCoins); YourTime.text = CustomExtensions.MillisecondsToTimer(yourTime); BestTime.text = CustomExtensions.MillisecondsToTimer(levelData.FastestTime); BestTimeAllCoins.text = CustomExtensions.MillisecondsToTimer(levelData.FastestTimeAllCoins); }
public void UpdateTime() { TimeElapsed = _stopwatch.ElapsedMilliseconds; _timerText.text = CustomExtensions.MillisecondsToTimer(TimeElapsed); }