Beispiel #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");
     }
 }
Beispiel #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);
        }