Exemplo n.º 1
0
 public void ServerInitialize(BaseNetworkSystem network, Peer localPeer)
 {
     m_network  = network;
     Peer       = localPeer;
     ID         = localPeer.ID;
     m_isServer = true;
     m_replicationLayer?.ServerInitialize(network, localPeer, m_buffer, m_updateRate);
     OnStartServer();
 }
Exemplo n.º 2
0
 public void ServerInitialize(BaseNetworkSystem network, Peer peer, BitBuffer buffer, float updateRate)
 {
     m_network    = network;
     m_peer       = peer;
     m_buffer     = buffer;
     m_updateRate = updateRate;
     m_nextUpdate = Time.time + m_updateRate;
     RegisterSyncs();
 }
Exemplo n.º 3
0
 public void ClientInitialize(BaseNetworkSystem network, uint localId, BitBuffer initBuffer)
 {
     m_network  = network;
     ID         = localId;
     m_isClient = true;
     m_isLocal  = network.Peer.IsSet && network.Peer.ID == localId;
     m_replicationLayer?.ClientInitialize();
     ReadInitialState(initBuffer);
     OnStartClient();
     if (m_isLocal)
     {
         OnStartLocalClient();
     }
 }