| 123456789101112131415161718192021222324 |
- 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;
- if (ins && ins.speedText) {
- ins.speedText.text = speed.ToString($"f{CommonConfig.arrowSpeedPrecision}");
- }
- }
- }
|