This commit is contained in:
ntr committed 2023-08-08 17:13:44 +10:00
1 parent 01e7df7a14
commit b65238e422
5 files changed
+53 -18

No files matched your search

+3
View File
@@ -11,6 +11,7 @@ public class ControlsUI : MonoBehaviour {
UIDocument uiDocument;
Label speed;
Label shields;
void OnEnable() {
Init();
@@ -19,6 +20,7 @@ public class ControlsUI : MonoBehaviour {
void Init() {
uiDocument = GetComponent<UIDocument>();
speed = uiDocument.rootVisualElement.Q<Label>("speed");
shields = uiDocument.rootVisualElement.Q<Label>("shields");
}
void FixedUpdate() {
@@ -29,5 +31,6 @@ public class ControlsUI : MonoBehaviour {
}
speed.text = $"{ship.Speed():0}";
shields.text = ship.Shields;
}
}