From 276644890ee9f0d23ace385b056cfd894a836f12 Mon Sep 17 00:00:00 2001 From: Julius <juliusfe@stud.ntnu.no> Date: Mon, 28 Nov 2022 16:53:29 +0100 Subject: [PATCH] Added namespace to endScreen --- MrBigsock/Assets/Code/UI/EndScreen.cs | 48 +++++++++++++++------------ 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/MrBigsock/Assets/Code/UI/EndScreen.cs b/MrBigsock/Assets/Code/UI/EndScreen.cs index c44abb08..673314ad 100644 --- a/MrBigsock/Assets/Code/UI/EndScreen.cs +++ b/MrBigsock/Assets/Code/UI/EndScreen.cs @@ -3,31 +3,35 @@ using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; -public class EndScreen : MonoBehaviour -{ - - public void Start() - { - Time.timeScale = 0; - GameObject menu = GameObject.Find("PlayerMenu(Clone)"); - if (menu != null) { - Destroy(menu.gameObject); +namespace BigSock.UI +{ + public class EndScreen : MonoBehaviour + { + + public void Start() + { + Time.timeScale = 0; + GameObject menu = GameObject.Find("PlayerMenu(Clone)"); + if (menu != null) + { + Destroy(menu.gameObject); + } } - } - public void OnDestroy() - { - Time.timeScale = 1; - } + public void OnDestroy() + { + Time.timeScale = 1; + } - public void GiveUp() - { - Application.Quit(); - } + public void GiveUp() + { + Application.Quit(); + } - public void TryAgain() - { - Destroy(gameObject); - SceneManager.LoadScene("MainMenu"); + public void TryAgain() + { + Destroy(gameObject); + SceneManager.LoadScene("MainMenu"); + } } } -- GitLab