[SerializeField] TextMeshProUGUI healthText;
[SerializeField] int health;
// Start is called before the first frame update
void Start()
{
}
private void UpdateHealthText()
{
healthText.text = health.ToString();
}
Debug.Log("Distance travelled" + distance.ToString("F2") + " m");
public void loadData()
{
FirebaseDatabase.DefaultInstance.GetReference("userlist").ValueChanged += Script_ValueChanged;
}
private void Script_ValueChanged(object sender, ValueChangedEventArgs e)
{
scoreboard.text = e.Snapshot.Child(LoadingScreen.userID).Child("userScore").GetValue(true).ToString();
}