shields
This commit is contained in:
1 parent
01e7df7a14
commit
b65238e422
5 files changed
+53
-18
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user