using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class Billboard : MonoBehaviour { public TextMeshProUGUI speedText; static Billboard ins; void Awake() { ins = this; } /**speed m/s */ public static void ShowSpeed(float speed) { //转km/h speed = speed * 3600f / 1000f; speed = (float)System.Math.Round((double)speed, 1); if (ins && ins.speedText) { ins.speedText.text = speed.ToString(); } } }