Snaparazzi/Assets/Scripts/PlayerSticker.cs

22 lines
510 B
C#
Raw Normal View History

2024-01-31 21:04:51 +00:00
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];
}
}