diff options
Diffstat (limited to 'Client/Assembly-CSharp/MatchMaker.cs')
-rw-r--r-- | Client/Assembly-CSharp/MatchMaker.cs | 41 |
1 files changed, 41 insertions, 0 deletions
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<MatchMaker> +{ + 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; + } + } +} |