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