20 lines
338 B
C#
20 lines
338 B
C#
|
using UnityEngine;
|
||
|
using UnityEngine.UI;
|
||
|
|
||
|
[RequireComponent(typeof(Text))]
|
||
|
public class LapTimeDisplay : MonoBehaviour
|
||
|
{
|
||
|
private Text _text;
|
||
|
public LapTime _lapTime;
|
||
|
|
||
|
private void Start()
|
||
|
{
|
||
|
_text = GetComponent<Text>();
|
||
|
}
|
||
|
|
||
|
private void Update()
|
||
|
{
|
||
|
_text.text = _lapTime.GetTimeString();
|
||
|
}
|
||
|
}
|