12345678910111213141516171819202122232425 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class HealthDisplayText : MonoBehaviour {
- Nexus target;
- public Text MoneyText;
- public Text HpText;
-
- void Start()
- {
- target = Nexus.CurrentInstance;
- }
-
- void OnGUI()
- {
-
- MoneyText.text ="Money: " + target.CurrentMana + "/" + target.maxMana;
-
- HpText.text = "HP: " + target.CurrentHealth + "/" + target.maxHealth;
- }
- }
|