mirror of
https://github.com/Steffo99/gravity-fusion.git
synced 2024-11-22 08:24:17 +00:00
20 lines
382 B
C#
20 lines
382 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
|
|
public class TextFromBlackHoleMass : MonoBehaviour
|
|
{
|
|
protected Text text;
|
|
public BlackHole blackHole;
|
|
|
|
protected void Awake() {
|
|
text = GetComponent<Text>();
|
|
}
|
|
|
|
protected void Update()
|
|
{
|
|
text.text = blackHole.Mass.ToString("0");
|
|
}
|
|
}
|