コード例 #1
0
ファイル: LoginNetworkManager.cs プロジェクト: soyboi/SS3D
 public override void OnStartClient()
 {
     base.OnStartClient();
     // This doesn't require authentication, as we want the user to authenticate with the Login Server first (which we get sent)
     NetworkClient.RegisterHandler <LoginServerMessage>(OnLoginDataMessage, false);
 }
コード例 #2
0
 // this is invoked by the UnityEngine
 public static void UNetStaticUpdate()
 {
     NetworkServer.Update();
     NetworkClient.UpdateClients();
     NetworkManager.UpdateScene();
 }
コード例 #3
0
ファイル: NetworkServer.cs プロジェクト: skymeson/MirrorNG
 /// <summary>
 /// This replaces the player object for a connection with a different player object. The old player object is not destroyed.
 /// <para>If a connection already has a player object, this can be used to replace that object with a different player object. This does NOT change the ready state of the connection, so it can safely be used while changing scenes.</para>
 /// </summary>
 /// <param name="conn">Connection which is adding the player.</param>
 /// <param name="client">Client associated to the player.</param>
 /// <param name="player">Player object spawned for the player.</param>
 /// <param name="keepAuthority">Does the previous player remain attached to this connection?</param>
 /// <returns></returns>
 public bool ReplacePlayerForConnection(INetworkConnection conn, NetworkClient client, GameObject player, bool keepAuthority = false)
 {
     return(InternalReplacePlayerForConnection(conn, client, player, keepAuthority));
 }
コード例 #4
0
 public virtual void OnStartClient(NetworkClient client)
 {
 }