Exemplo n.º 1
0
 /// <summary>
 /// Call a RPC method of this GameObject on remote clients of this room (or on all, including this client).
 /// </summary>
 /// <remarks>
 /// [Remote Procedure Calls](@ref rpcManual) are an essential tool in making multiplayer games with PUN.
 /// It enables you to make every client in a room call a specific method.
 ///
 /// This method allows you to make an RPC calls on a specific player's client.
 /// Of course, calls are affected by this client's lag and that of remote clients.
 ///
 /// Each call automatically is routed to the same PhotonView (and GameObject) that was used on the
 /// originating client.
 ///
 /// See: [Remote Procedure Calls](@ref rpcManual).
 /// </remarks>
 /// <param name="methodName">The name of a fitting method that was has the RPC attribute.</param>
 /// <param name="targetPlayer">The group of targets and the way the RPC gets sent.</param>
 /// <param name="parameters">The parameters that the RPC method has (must fit this call!).</param>
 public void RPC(string methodName, Player targetPlayer, params object[] parameters)
 {
     PhotonNetwork.RPC(this, methodName, targetPlayer, false, parameters);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Call a RPC method of this GameObject on remote clients of this room (or on all, inclunding this client).
 /// </summary>
 /// <remarks>
 /// [Remote Procedure Calls](@ref rpcManual) are an essential tool in making multiplayer games with PUN.
 /// It enables you to make every client in a room call a specific method.
 ///
 /// This method allows you to make an RPC calls on a specific player's client.
 /// Of course, calls are affected by this client's lag and that of remote clients.
 ///
 /// Each call automatically is routed to the same PhotonView (and GameObject) that was used on the
 /// originating client.
 ///
 /// See: [Remote Procedure Calls](@ref rpcManual).
 /// </remarks>
 ///<param name="methodName">The name of a fitting method that was has the RPC attribute.</param>
 ///<param name="targetPlayer">The group of targets and the way the RPC gets sent.</param>
 ///<param name="encrypt"> </param>
 ///<param name="parameters">The parameters that the RPC method has (must fit this call!).</param>
 public void RpcSecure(string methodName, Player targetPlayer, bool encrypt, params object[] parameters)
 {
     PhotonNetwork.RPC(this, methodName, targetPlayer, encrypt, parameters);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Call a RPC method of this GameObject on remote clients of this room (or on all, including this client).
 /// </summary>
 /// <remarks>
 /// [Remote Procedure Calls](@ref rpcManual) are an essential tool in making multiplayer games with PUN.
 /// It enables you to make every client in a room call a specific method.
 ///
 /// RPC calls can target "All" or the "Others".
 /// Usually, the target "All" gets executed locally immediately after sending the RPC.
 /// The "*ViaServer" options send the RPC to the server and execute it on this client when it's sent back.
 /// Of course, calls are affected by this client's lag and that of remote clients.
 ///
 /// Each call automatically is routed to the same PhotonView (and GameObject) that was used on the
 /// originating client.
 ///
 /// See: [Remote Procedure Calls](@ref rpcManual).
 /// </remarks>
 /// <param name="methodName">The name of a fitting method that was has the RPC attribute.</param>
 /// <param name="target">The group of targets and the way the RPC gets sent.</param>
 /// <param name="parameters">The parameters that the RPC method has (must fit this call!).</param>
 public void RPC(string methodName, RpcTarget target, params object[] parameters)
 {
     PhotonNetwork.RPC(this, methodName, target, false, parameters);
 }