controls broked
This commit is contained in:
1 parent
f7bdb5df1d
commit
8fdc3dba82
9 files changed
+900
-1670
No files matched your search
@@ -17,6 +17,7 @@ public class ControlsUI : MonoBehaviour {
|
||||
}
|
||||
|
||||
void Init() {
|
||||
Debug.Log("controls ui init");
|
||||
uiDocument = GetComponent<UIDocument>();
|
||||
speed = uiDocument.rootVisualElement.Q<Label>("speed");
|
||||
}
|
||||
|
||||
@@ -8,6 +8,12 @@ public class MenuControls : MonoBehaviour, SpaceRaceInput.IMenuActions {
|
||||
[SerializeField]
|
||||
UIDocument timingDoc;
|
||||
|
||||
[SerializeField]
|
||||
UIDocument crosshairDoc;
|
||||
|
||||
[SerializeField]
|
||||
UIDocument controlsDoc;
|
||||
|
||||
[SerializeField]
|
||||
ShipControls shipControls;
|
||||
|
||||
@@ -48,8 +54,11 @@ public class MenuControls : MonoBehaviour, SpaceRaceInput.IMenuActions {
|
||||
menuDoc.enabled = true;
|
||||
menuUi.AddTracks();
|
||||
|
||||
// TODO abstract all this cause it's shit
|
||||
// take control off the ship
|
||||
timingDoc.enabled = false;
|
||||
crosshairDoc.enabled = false;
|
||||
controlsDoc.enabled = false;
|
||||
timingUi.enabled = false;
|
||||
shipControls.enabled = false;
|
||||
}
|
||||
@@ -61,6 +70,8 @@ public class MenuControls : MonoBehaviour, SpaceRaceInput.IMenuActions {
|
||||
|
||||
// resume control of the ship
|
||||
timingDoc.enabled = true;
|
||||
crosshairDoc.enabled = true;
|
||||
controlsDoc.enabled = true;
|
||||
timingUi.enabled = true;
|
||||
shipControls.enabled = true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user