Made menus much nicer to look at

Also added a changeable FOV
This commit is contained in:
2025-05-02 11:28:36 +01:00
parent cc701b5a00
commit 57c0acbab9
5 changed files with 3325 additions and 188 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -28,6 +28,8 @@ public class CameraController : MonoBehaviour
// Start is called before the first frame update
void Start()
{
gameObject.GetComponent<Camera>().fieldOfView = MainMenu.fov;
// Checks it is the only instance
if (s_Instance == null)
{

View File

@@ -30,6 +30,7 @@ public class PortalCamera : MonoBehaviour
// Gets the camera from the component
m_Camera = gameObject.GetComponent<Camera>();
m_Camera.fieldOfView = MainMenu.fov;
// Creates the render texture
RenderTextureDescriptor descriptor = new(Screen.width, Screen.height);

View File

@@ -18,8 +18,11 @@ public class MainMenu : MonoBehaviour
[Header("Options References")]
[SerializeField] Text m_SensText;
[SerializeField] Slider m_SensitivitySlider;
[SerializeField] Text m_FOVText;
[SerializeField] Slider m_FOVSlider;
public static float sens = 100.0f;
public static float sens = 35;
public static float fov = 90;
private void Start()
{
@@ -30,6 +33,9 @@ public class MainMenu : MonoBehaviour
Cursor.visible = true;
Cursor.lockState = CursorLockMode.Confined;
m_FOVSlider.value = fov;
m_SensitivitySlider.value = sens;
}
public void StartGame() => SceneManager.LoadScene(1);
@@ -65,5 +71,8 @@ public class MainMenu : MonoBehaviour
sens = m_SensitivitySlider.value;
m_SensText.text = sens.ToString();
fov = m_FOVSlider.value;
m_FOVText.text = fov.ToString();
}
}

View File

@@ -144,7 +144,7 @@
{
"type": "UnityEngine.ProBuilder.SelectMode, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
"key": "editor.lastMeshSelectMode",
"value": "{\"m_Value\":4}"
"value": "{\"m_Value\":8}"
},
{
"type": "UnityEngine.ProBuilder.SelectionModifierBehavior, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",