示例#1
0
 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);
         }
     }
 }
示例#2
0
        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);
            }
        }
示例#3
0
 public void OnJoinedServer(EiNetworkServerInternal serverInternal)
 {
     Log("Joined server - " + serverInternal.Name);
     Message.Publish(new NetworkServerJoinedMessage(serverInternal));
 }
示例#4
0
 public void OnCreatedServer(EiNetworkServerInternal serverInternal)
 {
     Log("Server Created - " + serverInternal.Name);
     Message.Publish(new NetworkServerCreatedMessage(serverInternal));
 }