using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class ClientData { public static Action onClientDataUpdate; public static List clientIPList = new List(); public static bool AddClientID(ulong clientID) { if(!clientIPList.Contains(clientID)) { clientIPList.Add(clientID); if(onClientDataUpdate != null) { onClientDataUpdate(); } return true; } return false; } public static bool RemoveClientID(ulong clientID) { if(clientIPList.Contains(clientID)) { clientIPList.Remove(clientID); if(onClientDataUpdate != null) { onClientDataUpdate(); } return true; } return false; } }