2019-10-06 22:21:35 +00:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class TextFromUnspentBlackHoleMass : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
protected Text text;
|
2019-10-07 11:44:26 +00:00
|
|
|
|
protected GameController gameController;
|
2019-10-06 22:21:35 +00:00
|
|
|
|
|
|
|
|
|
protected void Awake() {
|
|
|
|
|
text = GetComponent<Text>();
|
2019-10-07 11:44:26 +00:00
|
|
|
|
gameController = GameObject.Find("GameController").GetComponent<GameController>();
|
2019-10-06 22:21:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected void Update()
|
|
|
|
|
{
|
2019-10-07 11:44:26 +00:00
|
|
|
|
text.text = gameController.blackHole.UnspentMass.ToString("0");
|
2019-10-06 22:21:35 +00:00
|
|
|
|
}
|
|
|
|
|
}
|