From e9ea621b93fbb58d9edfca8375918791637bbd52 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 30 Dec 2020 20:59:04 +0800 Subject: +init --- Client/Assembly-CSharp/WaitForHostPopup.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Client/Assembly-CSharp/WaitForHostPopup.cs (limited to 'Client/Assembly-CSharp/WaitForHostPopup.cs') diff --git a/Client/Assembly-CSharp/WaitForHostPopup.cs b/Client/Assembly-CSharp/WaitForHostPopup.cs new file mode 100644 index 0000000..5ccade5 --- /dev/null +++ b/Client/Assembly-CSharp/WaitForHostPopup.cs @@ -0,0 +1,27 @@ +using System; +using InnerNet; +using UnityEngine; + +public class WaitForHostPopup : DestroyableSingleton +{ + public GameObject Content; + + public void Show() + { + if (AmongUsClient.Instance && AmongUsClient.Instance.ClientId > 0) + { + this.Content.SetActive(true); + } + } + + public void ExitGame() + { + AmongUsClient.Instance.ExitGame(DisconnectReasons.ExitGame); + this.Content.SetActive(false); + } + + public void Hide() + { + this.Content.SetActive(false); + } +} -- cgit v1.1-26-g67d0