21 lines
655 B
C#
21 lines
655 B
C#
|
|
using System.Collections;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using UnityEngine;
|
|||
|
|
using TMPro;
|
|||
|
|
|
|||
|
|
public class HUDController : MonoBehaviour {
|
|||
|
|
[SerializeField] TextMeshProUGUI levelText;
|
|||
|
|
[SerializeField] TextMeshProUGUI expText;
|
|||
|
|
[SerializeField] TextMeshProUGUI hpText;
|
|||
|
|
|
|||
|
|
private void FixedUpdate() {
|
|||
|
|
Refresh();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void Refresh() {
|
|||
|
|
levelText.SetText("LV. " + State.state.stats.level.ToString());
|
|||
|
|
expText.SetText(State.state.stats.exp.ToString() + " / " + State.state.stats.maxExp.ToString());
|
|||
|
|
hpText.SetText(State.state.stats.hp.ToString() + " / " + State.state.stats.maxHP.ToString());
|
|||
|
|
}
|
|||
|
|
}
|