Files
Crash-Course/Assets/Scripts/Game/PlayerJoinCard.cs

39 lines
1011 B
C#
Raw Normal View History

2025-02-16 16:47:45 -05:00
using TMPro;
2025-04-18 15:54:50 -04:00
using UnityEngine;
using Game;
using Music;
using Player;
2025-04-16 19:57:54 -04:00
namespace Game
{
2025-04-18 15:54:50 -04:00
/// <summary>
/// This class represents a player join card, displaying the player's number
/// and preview in the game lobby.
/// </summary>
public class PlayerJoinCard : MonoBehaviour
{
/// <summary>
/// The preview object representing the player.
/// </summary>
public GameObject playerPreview;
2025-02-16 16:47:45 -05:00
2025-04-18 15:54:50 -04:00
/// <summary>
/// The number assigned to the player.
/// </summary>
public int playerNumber;
2025-02-16 16:47:45 -05:00
2025-04-18 15:54:50 -04:00
/// <summary>
/// The text element displaying the player's number.
/// </summary>
public TextMeshProUGUI playerNumberText;
/// <summary>
/// Sets the player's number text when the game starts.
/// </summary>
private void Start()
{
// Display the player's number on the join card
playerNumberText.text = playerNumber.ToString();
}
2025-02-16 16:47:45 -05:00
}
2025-04-16 19:57:54 -04:00
}