summaryrefslogtreecommitdiff
path: root/Client/Assembly-CSharp/SceneChanger.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assembly-CSharp/SceneChanger.cs')
-rw-r--r--Client/Assembly-CSharp/SceneChanger.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/Client/Assembly-CSharp/SceneChanger.cs b/Client/Assembly-CSharp/SceneChanger.cs
new file mode 100644
index 0000000..0a58fa1
--- /dev/null
+++ b/Client/Assembly-CSharp/SceneChanger.cs
@@ -0,0 +1,27 @@
+using System;
+using UnityEngine;
+using UnityEngine.SceneManagement;
+using UnityEngine.UI;
+
+public class SceneChanger : MonoBehaviour
+{
+ public string TargetScene;
+
+ public Button.ButtonClickedEvent BeforeSceneChange;
+
+ public void Click()
+ {
+ this.BeforeSceneChange.Invoke();
+ SceneChanger.ChangeScene(this.TargetScene);
+ }
+
+ public static void ChangeScene(string target)
+ {
+ SceneManager.LoadScene(target);
+ }
+
+ public void ExitGame()
+ {
+ Application.Quit();
+ }
+}