Update Leaderboard Script for Constrained Layout
This commit is contained in:
parent
d72067a489
commit
2d67c2d5d3
@ -38,9 +38,9 @@ public class LeaderboardHandle : MonoBehaviour
|
|||||||
GameOverPanel.GetComponent<Animator>().enabled = true;
|
GameOverPanel.GetComponent<Animator>().enabled = true;
|
||||||
for (int i = 0; i < Scores.Count; i++)
|
for (int i = 0; i < Scores.Count; i++)
|
||||||
{
|
{
|
||||||
Text scoreLabel = GameObject.Find($"ScoreText ({i + 1})").GetComponent<Text>();
|
GameObject.Find($"ScoreText ({i + 1}2)").GetComponent<Text>().text = Scores[i].username;
|
||||||
string editedText = System.String.Format("{0,3} {1,22} {2,22} {3,22}", scoreLabel.text, Scores[i].username, Scores[i].score, Scores[i].timeLasted);
|
GameObject.Find($"ScoreText ({i + 1}3)").GetComponent<Text>().text = Scores[i].score.ToString();
|
||||||
scoreLabel.text = editedText;
|
GameObject.Find($"ScoreText ({i + 1}4)").GetComponent<Text>().text = Scores[i].timeLasted.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user