Snaparazzi/Assets/Scripts/PlayerSticker.cs
2024-01-31 22:04:51 +01:00

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];
}
}