menu fixes
This commit is contained in:
1 parent
268608a459
commit
45fc3026b4
2 files changed
+6
-3
No files matched your search
@@ -21,7 +21,6 @@ public class MenuControls : MonoBehaviour, SpaceRaceInput.IMenuActions {
|
|||||||
input.menu.SetCallbacks(this);
|
input.menu.SetCallbacks(this);
|
||||||
}
|
}
|
||||||
input.menu.Enable();
|
input.menu.Enable();
|
||||||
Debug.Log($"Menu {visible}");
|
|
||||||
Hide();
|
Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,7 +47,7 @@ public class MenuControls : MonoBehaviour, SpaceRaceInput.IMenuActions {
|
|||||||
|
|
||||||
public void OnToggleMenu(InputAction.CallbackContext ctx) {
|
public void OnToggleMenu(InputAction.CallbackContext ctx) {
|
||||||
visible = !visible;
|
visible = !visible;
|
||||||
Debug.Log($"Menu {visible}");
|
// Debug.Log($"Menu {visible}");
|
||||||
|
|
||||||
if (visible) {
|
if (visible) {
|
||||||
Show();
|
Show();
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class ShipUi : MonoBehaviour {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FixedUpdate() {
|
void FixedUpdate() {
|
||||||
timer.text = $"{TimeSpan.FromSeconds(timing.lapTime):g}";
|
timer.text = $"{TimeSpan.FromSeconds(timing.lapTime):m\\:ss\\.fff}";
|
||||||
speed.text = $"{ship.Speed():0} u/s";
|
speed.text = $"{ship.Speed():0} u/s";
|
||||||
|
|
||||||
// clearly this is not ideal but idk atm
|
// clearly this is not ideal but idk atm
|
||||||
@@ -39,6 +39,10 @@ public class ShipUi : MonoBehaviour {
|
|||||||
if (sectors == null)
|
if (sectors == null)
|
||||||
Debug.LogWarning("null sectors");
|
Debug.LogWarning("null sectors");
|
||||||
|
|
||||||
|
// timing not ready yet or smth?
|
||||||
|
if (timing.lapTimes == null)
|
||||||
|
return;
|
||||||
|
|
||||||
timeSheet.Clear();
|
timeSheet.Clear();
|
||||||
foreach (Lap lap in timing.lapTimes) {
|
foreach (Lap lap in timing.lapTimes) {
|
||||||
Label l = new Label();
|
Label l = new Label();
|
||||||
|
|||||||
Reference in new issue
Block a user