22 lines
510 B
C#
22 lines
510 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class PlayerSticker : MonoBehaviour
|
|
{
|
|
|
|
[Header("References")]
|
|
[SerializeField] private TextMeshProUGUI playerNameLabel;
|
|
[SerializeField] private Image background;
|
|
[SerializeField] private List<Sprite> colors;
|
|
|
|
public void Initialize(string _playerName, int _index)
|
|
{
|
|
playerNameLabel.text = _playerName;
|
|
background.sprite = colors[_index];
|
|
}
|
|
|
|
}
|