summaryrefslogtreecommitdiff
path: root/Client/Assembly-CSharp/PingTracker.cs
blob: 727d71ca6cc58a3f0fdedef57431c12aaa511dc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using System;
using UnityEngine;

public class PingTracker : MonoBehaviour
{
	public TextRenderer text;

	private void Update()
	{
		if (AmongUsClient.Instance)
		{
			if (AmongUsClient.Instance.GameMode == GameModes.FreePlay)
			{
				base.gameObject.SetActive(false);
			}
			this.text.Text = string.Format("Ping: {0} ms", AmongUsClient.Instance.Ping);
		}
	}
}