25 lines
582 B
C#
Raw Normal View History

2022-03-31 18:40:19 +08:00
using UnityEngine;
using UnityEngine.UI;
namespace Assets.Scripts.Scenes.VideoRide
{
class WatchPanelScript:MonoBehaviour
{
VideoGameManager manager { get; set; }
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;
}
}
}
}