2024-01-29 22:49:48 +00:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
public class ScoringPage : MonoBehaviour
|
|
|
|
{
|
2024-01-31 22:45:05 +00:00
|
|
|
[SerializeField] private List<PlayerSticker> playerStickers;
|
|
|
|
|
|
|
|
public void Initialize(Room _room)
|
2024-01-29 22:49:48 +00:00
|
|
|
{
|
2024-01-31 22:45:58 +00:00
|
|
|
gameObject.SetActive(true);
|
2024-01-31 22:45:05 +00:00
|
|
|
foreach(PlayerSticker p in playerStickers)
|
|
|
|
{
|
|
|
|
p.gameObject.SetActive(false);
|
|
|
|
}
|
|
|
|
|
2024-01-29 22:49:48 +00:00
|
|
|
gameObject.SetActive(true);
|
2024-01-31 22:45:05 +00:00
|
|
|
Player[] players = _room.GetOrderedPlayerList().ToArray();
|
|
|
|
for (int i = 0; i < players.Length; i++)
|
|
|
|
{
|
|
|
|
playerStickers[i].gameObject.SetActive(true);
|
|
|
|
playerStickers[i].Initialize(players[i].name, i);
|
|
|
|
}
|
2024-01-29 22:49:48 +00:00
|
|
|
}
|
|
|
|
}
|