This repository has been archived on 2025-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class Score : MonoBehaviour
|
|
{
|
|
public Transform player;
|
|
public Text scoreDisplay;
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
scoreDisplay.text=(player.position.z).ToString("0");
|
|
}
|
|
}
|