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/MatchMaker.cs | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Client/Assembly-CSharp/MatchMaker.cs (limited to 'Client/Assembly-CSharp/MatchMaker.cs') diff --git a/Client/Assembly-CSharp/MatchMaker.cs b/Client/Assembly-CSharp/MatchMaker.cs new file mode 100644 index 0000000..8c36a5c --- /dev/null +++ b/Client/Assembly-CSharp/MatchMaker.cs @@ -0,0 +1,41 @@ +using System; +using InnerNet; +using UnityEngine; + +public class MatchMaker : DestroyableSingleton +{ + public TextBox NameText; + + public TextBox GameIdText; + + private MonoBehaviour Connecter; + + public void Start() + { + if (this.GameIdText && AmongUsClient.Instance) + { + this.GameIdText.SetText(InnerNetClient.IntToGameName(AmongUsClient.Instance.GameId) ?? "", ""); + } + } + + public bool Connecting(MonoBehaviour button) + { + if (!this.Connecter) + { + this.Connecter = button; + ((IConnectButton)this.Connecter).StartIcon(); + return true; + } + base.StartCoroutine(Effects.Shake(this.Connecter.transform, 0.75f, 0.25f)); + return false; + } + + public void NotConnecting() + { + if (this.Connecter) + { + ((IConnectButton)this.Connecter).StopIcon(); + this.Connecter = null; + } + } +} -- cgit v1.1-26-g67d0