show score
This commit is contained in:
parent
1158270ca6
commit
c10683a6f6
@ -39,11 +39,13 @@ public void Initialize(Room _room)
|
||||
scoreByUser = scoreByUser.OrderByDescending(x => x.Value).ToDictionary(x => x.Key, x => x.Value);
|
||||
|
||||
List<string> playersId = scoreByUser.Keys.ToList();
|
||||
for ( int i = 0; i < playersId.Count; i++)
|
||||
int countPlayers = scoreByUser.Keys.ToList().Count;
|
||||
for (int i = 0; i < countPlayers; i++)
|
||||
{
|
||||
Player p = _room.GetPlayerById(playersId[i]);
|
||||
Player p = _room.GetPlayerById(scoreByUser.Keys.ToList()[i]);
|
||||
playerStickers[i].gameObject.SetActive(true);
|
||||
playerStickers[i].Initialize( p.name , i);
|
||||
string nameAndScore = p.name +'\n'+ scoreByUser[p.id] +" pts";
|
||||
playerStickers[i].Initialize(nameAndScore, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user