boosts
This commit is contained in:
1 parent
716da3b146
commit
fc20f6e197
7 files changed
+258
-98
No files matched your search
@@ -11,6 +11,10 @@
|
||||
<ui:Label tabindex="-1" display-tooltip-when-elided="true" name="shields" text="100" style="min-width: 5%; -unity-text-align: upper-right; flex-basis: 10%;" />
|
||||
<ui:Label tabindex="-1" text="%" display-tooltip-when-elided="true" name="units" style="flex-basis: 10%; -unity-text-align: upper-left;" />
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement name="boostCtr" style="align-items: center; flex-direction: row; justify-content: center;">
|
||||
<ui:Label tabindex="-1" display-tooltip-when-elided="true" name="boosts" text="1" style="min-width: 5%; -unity-text-align: upper-right; flex-basis: 10%;" />
|
||||
<ui:Label tabindex="-1" text="Boosts" display-tooltip-when-elided="true" name="units" style="flex-basis: 10%; -unity-text-align: upper-left;" />
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement name="puCtr" style="flex-direction: row;">
|
||||
<ui:Label tabindex="-1" display-tooltip-when-elided="true" name="puAccel" text="100" />
|
||||
<ui:Label tabindex="-1" text="100" display-tooltip-when-elided="true" name="puDecel" />
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user