You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
public class HMBData : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
public int ID;
|
|
|
|
|
public float speed;
|
|
|
|
|
|
|
|
|
|
public float x;
|
|
|
|
|
public float y;
|
|
|
|
|
public float z;
|
|
|
|
|
|
|
|
|
|
public Text IDtxt;
|
|
|
|
|
public Text speedtxt;
|
|
|
|
|
public Text PosXTxt;
|
|
|
|
|
public Text PosYTxt;
|
|
|
|
|
[HideInInspector]
|
|
|
|
|
public Car m_car;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void Update()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (m_car != null)
|
|
|
|
|
{
|
|
|
|
|
speed = m_car.overSpeed;
|
|
|
|
|
x = Mathf.Abs( m_car.transform.position.x);
|
|
|
|
|
y = Mathf.Abs(m_car.transform.position.y);
|
|
|
|
|
z = Mathf.Abs(m_car.transform.position.z);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IDtxt.text = ID.ToString();
|
|
|
|
|
speedtxt.text = speed.ToString();
|
|
|
|
|
PosXTxt.text ="x:"+ x.ToString("0.0");
|
|
|
|
|
PosYTxt.text ="y"+ y.ToString("0.0");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|