This commit is contained in:
ntr committed 2023-08-10 17:57:29 +10:00
1 parent 716da3b146
commit fc20f6e197
7 files changed
+258 -98

No files matched your search

+5 -2
View File
@@ -12,6 +12,7 @@ public class ControlsUI : MonoBehaviour {
UIDocument uiDocument;
Label speed;
Label shields;
Label boosts;
Label puAccel;
Label puDecel;
Label puStrafe;
@@ -27,6 +28,7 @@ public class ControlsUI : MonoBehaviour {
shields = uiDocument.rootVisualElement.Q<Label>("shields");
// PowerUnit
boosts = uiDocument.rootVisualElement.Q<Label>("boosts");
puAccel = uiDocument.rootVisualElement.Q<Label>("puAccel");
puDecel = uiDocument.rootVisualElement.Q<Label>("puDecel");
puStrafe = uiDocument.rootVisualElement.Q<Label>("puStrafe");
@@ -41,11 +43,12 @@ public class ControlsUI : MonoBehaviour {
}
speed.text = $"{ship.Speed():0}";
shields.text = ship.powerUnit.ShieldsPct;
shields.text = ship.powerUnit.ShieldPct;
boosts.text = ship.powerUnit.BoostsAvailable;
puAccel.text = ship.powerUnit.Acceleration.ToString();
puDecel.text = ship.powerUnit.Deceleration.ToString();
puStrafe.text = ship.powerUnit.Strafing.ToString();
puShield.text = ship.powerUnit.ShieldsMax.ToString();
puShield.text = ship.powerUnit.ShieldMax.ToString();
}
}