menu bokeh undecided on
This commit is contained in:
1 parent
ece7e8784a
commit
285006fd9e
14 files changed
+309
-74
No files matched your search
@@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
public class MenuControls : MonoBehaviour {
|
||||
@@ -19,6 +20,8 @@ public class MenuControls : MonoBehaviour {
|
||||
|
||||
MenuUI menuUi;
|
||||
|
||||
Volume effectsVolume;
|
||||
|
||||
[SerializeField]
|
||||
TimingUI timingUi;
|
||||
|
||||
@@ -37,6 +40,7 @@ public class MenuControls : MonoBehaviour {
|
||||
|
||||
void Awake() {
|
||||
menuDoc = GetComponent<UIDocument>();
|
||||
effectsVolume = GetComponent<Volume>();
|
||||
|
||||
if (input == null) input = new SpaceRaceInput();
|
||||
input.menu.Enable();
|
||||
@@ -71,6 +75,7 @@ public class MenuControls : MonoBehaviour {
|
||||
visible = true;
|
||||
UnityEngine.Cursor.lockState = CursorLockMode.None;
|
||||
menuDoc.enabled = true;
|
||||
effectsVolume.enabled = true;
|
||||
menuUi.AddTracks();
|
||||
menuUi.FocusTracks();
|
||||
|
||||
@@ -90,6 +95,7 @@ public class MenuControls : MonoBehaviour {
|
||||
visible = false;
|
||||
UnityEngine.Cursor.lockState = CursorLockMode.Locked;
|
||||
menuDoc.enabled = false;
|
||||
effectsVolume.enabled = false;
|
||||
|
||||
// resume control of the ship
|
||||
timingDoc.enabled = true;
|
||||
|
||||
@@ -25,6 +25,8 @@ public class TimingUI : MonoBehaviour {
|
||||
Label noticeTime;
|
||||
Label noticePosition;
|
||||
|
||||
bool ShouldHide => timing?.sectors.Count() == 0;
|
||||
|
||||
static string[] completionMsgs = {
|
||||
"smooth",
|
||||
"very fast",
|
||||
@@ -64,6 +66,10 @@ public class TimingUI : MonoBehaviour {
|
||||
notice.AddToClassList("hidden");
|
||||
}
|
||||
|
||||
void Start() {
|
||||
if (ShouldHide) uiDocument.enabled = false;
|
||||
}
|
||||
|
||||
void FixedUpdate() {
|
||||
if (timer == null || timing == null) {
|
||||
Debug.LogWarning("no timer");
|
||||
|
||||
Reference in new issue
Block a user