summaryrefslogtreecommitdiff
path: root/Client/Assembly-CSharp/MatchMaker.cs
blob: 8c36a5c00e74ef0a0f4e0e6e3042635a70e0f961 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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;
		}
	}
}