public void Remove(EiNetworkServerInternal server) { for (int i = serverList.Count - 1; i >= 0; i--) { if (serverList [i].Id == server.Id) { serverList.RemoveAt(i); Log("Removed server with id: " + server.Id); } } }
public void Add(EiNetworkServerInternal server) { bool hasServer = false; for (int i = serverList.Count - 1; i >= 0; i--) { if (serverList [i].Id == server.Id) { hasServer = true; break; } } if (hasServer) { LogError("Already has a server with given id: " + server.Id); } else { serverList.Add(server); } }
public void OnJoinedServer(EiNetworkServerInternal serverInternal) { Log("Joined server - " + serverInternal.Name); Message.Publish(new NetworkServerJoinedMessage(serverInternal)); }
public void OnCreatedServer(EiNetworkServerInternal serverInternal) { Log("Server Created - " + serverInternal.Name); Message.Publish(new NetworkServerCreatedMessage(serverInternal)); }