25 lines
605 B
C#
25 lines
605 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace Assets.Scripts.Scenes.VideoRide
|
|
{
|
|
public class WatchPanelScript:MonoBehaviour
|
|
{
|
|
private VideoGameManager manager { get; set; }
|
|
private Text userName { get; set; }
|
|
private void Start()
|
|
{
|
|
manager = FindObjectOfType<VideoGameManager>();
|
|
userName = transform.Find("name").GetComponent<Text>();
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
if (manager != null)
|
|
{
|
|
userName.text = manager.CurrentPlayer?.UserName;
|
|
}
|
|
}
|
|
}
|
|
}
|