Skip to content

Commit 5790c15

Browse files
author
NullPointerExceptionError
committed
Settings menu
1 parent 8c465f7 commit 5790c15

File tree

10 files changed

+1555
-744
lines changed

10 files changed

+1555
-744
lines changed

WhaleFall/Assets/Scenes/Settings.unity

Lines changed: 982 additions & 576 deletions
Large diffs are not rendered by default.

WhaleFall/Assets/Scenes/StartMenu.unity

Lines changed: 267 additions & 121 deletions
Large diffs are not rendered by default.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
5+
public class SettingsMenu : MonoBehaviour
6+
{
7+
public void SetFullscreen (bool isFullScreen)
8+
{
9+
Screen.fullScreen = isFullScreen;
10+
}
11+
}

WhaleFall/Assets/Scripts/SettingsMenu.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
using UnityEngine.SceneManagement;
5+
6+
public class SettingsToMainMenu : MonoBehaviour
7+
{
8+
// Start is called before the first frame update
9+
public void ReturnToMenu()
10+
{
11+
SceneManager.LoadScene("StartMenu");
12+
}
13+
14+
// Update is called once per frame
15+
void Update()
16+
{
17+
if(Input.GetKey(KeyCode.Space) || Input.GetKey(KeyCode.Return))
18+
{
19+
ReturnToMenu();
20+
}
21+
}
22+
}

WhaleFall/Assets/Scripts/SettingsToMainMenu.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
using UnityEngine.SceneManagement;
5+
6+
public class StartManuToSettings : MonoBehaviour
7+
{
8+
// Start is called before the first frame update
9+
public void ToSettings()
10+
{
11+
SceneManager.LoadScene("Settings");
12+
}
13+
}

WhaleFall/Assets/Scripts/StartManuToSettings.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

WhaleFall/ProjectSettings/EditorBuildSettings.asset

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ EditorBuildSettings:
1414
- enabled: 1
1515
path: Assets/Scenes/GameOverScreen.unity
1616
guid: 5f0fc8e9656a4a94e9e90ca1618b8551
17+
- enabled: 1
18+
path: Assets/Scenes/Settings.unity
19+
guid: ff76709f10cfe554990f132b793888fe
1720
m_configObjects: {}

0 commit comments

Comments
 (0)