Exemplo n.º 1
0
 /// <summary>
 /// This is a hook that is invoked when the client is started.
 /// </summary>
 /// <param name="client"></param>
 public virtual void OnStartClient(LiteNetLibClient client)
 {
     if (LogInfo)
     {
         Debug.Log("[" + name + "] LiteNetLibManager::OnStartClient");
     }
 }
Exemplo n.º 2
0
        public virtual LiteNetLibClient StartClient()
        {
            if (Client != null)
            {
                return(Client);
            }

            Client = new LiteNetLibClient(this, connectKey);
            RegisterClientMessages();
            SetConfigs(Client.NetManager);
            Client.NetManager.Start();
            Client.NetManager.Connect(networkAddress, networkPort);
            OnStartClient(Client);
            return(Client);
        }