Skip to content
Snippets Groups Projects
Commit 4a39c430 authored by Julius Fredrik Einum's avatar Julius Fredrik Einum
Browse files

Small logic changes and cleaning

parent 2faedcfd
No related branches found
No related tags found
2 merge requests!75Main,!71Juliuses nye super branch
...@@ -13,16 +13,16 @@ namespace BigSock.UI ...@@ -13,16 +13,16 @@ namespace BigSock.UI
originalTime = Time.timeScale; originalTime = Time.timeScale;
Time.timeScale = 0; Time.timeScale = 0;
} }
public void ExitMenu()
{
Destroy(gameObject);
}
public void OnDestroy() public void OnDestroy()
{ {
Time.timeScale = originalTime; Time.timeScale = originalTime;
} }
public void ExitMenu()
{
Destroy(gameObject);
}
} }
} }
...@@ -24,7 +24,7 @@ public class EndScreen : MonoBehaviour ...@@ -24,7 +24,7 @@ public class EndScreen : MonoBehaviour
public void TryAgain() public void TryAgain()
{ {
Destroy(gameObject);
SceneManager.LoadScene("MainMenu"); SceneManager.LoadScene("MainMenu");
} }
} }
...@@ -11,21 +11,12 @@ public class MainMenuScript : MonoBehaviour ...@@ -11,21 +11,12 @@ public class MainMenuScript : MonoBehaviour
public string firstLevel; public string firstLevel;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void StartGame() public void StartGame()
{ {
SceneManager.LoadScene(firstLevel); SceneManager.LoadScene(firstLevel);
Time.timeScale = 1;
} }
public void OpenOptions() public void OpenOptions()
......
...@@ -20,7 +20,7 @@ namespace BigSock.UI ...@@ -20,7 +20,7 @@ namespace BigSock.UI
public void OnDestroy() public void OnDestroy()
{ {
Time.timeScale = originalTime; Time.timeScale = 1;
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment