Merge pull request #13 from Games-Academy-Student-Work-21-22/scoreboard-alignment-fix
Scoreboard alignment fix
This commit is contained in:
commit
36883be734
File diff suppressed because it is too large
Load Diff
1694
Unity-Files/Assets/Examples/Defender/Defender.unity
generated
1694
Unity-Files/Assets/Examples/Defender/Defender.unity
generated
File diff suppressed because it is too large
Load Diff
@ -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