aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikkel Bybjerg <mikkel.bybjerg@hotmail.com>2019-04-28 03:45:41 +0200
committerMikkel Bybjerg <mikkel.bybjerg@hotmail.com>2019-04-28 03:45:41 +0200
commitf28fd7ed5916af2a5a590e36635859d2a4a7cc3c (patch)
treedca755531321f276e33e466a61ddd93cd43d77fb /nGJ2019/Assets/Scripts/TitleScreen.cs
parentdd492fa6f63bce29edc1945ad183704580a27112 (diff)
parenteebe04b0c81dc2660335a1e09157c7a18189ddc3 (diff)
merge
Diffstat (limited to 'nGJ2019/Assets/Scripts/TitleScreen.cs')
-rw-r--r--nGJ2019/Assets/Scripts/TitleScreen.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/nGJ2019/Assets/Scripts/TitleScreen.cs b/nGJ2019/Assets/Scripts/TitleScreen.cs
new file mode 100644
index 0000000..d439c51
--- /dev/null
+++ b/nGJ2019/Assets/Scripts/TitleScreen.cs
@@ -0,0 +1,25 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.EventSystems;
+using UnityEngine.SceneManagement;
+
+public class TitleScreen : MonoBehaviour
+{
+ void Update()
+ {
+ // quit application when back button is clicked
+ if (Input.GetKeyDown(KeyCode.Escape))
+ Application.Quit();
+ }
+
+ public void ToLevel1()
+ {
+ SceneManager.LoadScene("Level1");
+ }
+
+ public void Quit()
+ {
+ Application.Quit();
+ }
+}