mirror of
https://github.com/PashaBibko/The-Mobius-Line.git
synced 2026-04-03 17:39:03 +00:00
Made menus much nicer to look at
Also added a changeable FOV
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user