AwesomeRunner/Assets/Scripts/UI/Views/PlayerScoreboardCard.cs
VladimirPirozhenko 6999e84b65 Added pause and pause view, added restriction of input while in paused state
Upgraded Input system to fit demands of paused game (no movement inputs allowed!)
2022-08-12 05:38:17 +03:00

23 lines
638 B
C#

using TMPro;
using UnityEngine;
public struct PlayerScoreboardCardData
{
public string playerName;
public string playerScore;
public PlayerScoreboardCardData(string playerName,string playerScore)
{
this.playerName = playerName;
this.playerScore = playerScore;
}
}
public class PlayerScoreboardCard : MonoBehaviour
{
[SerializeField] private TextMeshProUGUI playerName;
[SerializeField] private TextMeshProUGUI playerScore;
public void UpdateCard(PlayerScoreboardCardData data)
{
playerName.text = data.playerName;
playerScore.text = data.playerScore;
}
}