mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
RemoteCalls.Invoker.remoteCallType renamed to callType for simplicity
This commit is contained in:
parent
1242fb1356
commit
0418f1c9d2
@ -13,14 +13,14 @@ public enum RemoteCallType { Command, ClientRpc }
|
||||
class Invoker
|
||||
{
|
||||
public Type invokeClass;
|
||||
public RemoteCallType remoteCallType;
|
||||
public RemoteCallType callType;
|
||||
public RemoteCallDelegate function;
|
||||
public bool cmdRequiresAuthority;
|
||||
|
||||
public bool AreEqual(Type invokeClass, RemoteCallType remoteCallType, RemoteCallDelegate invokeFunction)
|
||||
{
|
||||
return (this.invokeClass == invokeClass &&
|
||||
this.remoteCallType == remoteCallType &&
|
||||
this.callType == remoteCallType &&
|
||||
this.function == invokeFunction);
|
||||
}
|
||||
}
|
||||
@ -60,7 +60,7 @@ internal static int RegisterDelegate(Type invokeClass, string functionFullName,
|
||||
|
||||
remoteCallDelegates[hash] = new Invoker
|
||||
{
|
||||
remoteCallType = remoteCallType,
|
||||
callType = remoteCallType,
|
||||
invokeClass = invokeClass,
|
||||
function = func,
|
||||
cmdRequiresAuthority = cmdRequiresAuthority
|
||||
@ -86,7 +86,7 @@ internal static void RemoveDelegate(int hash) =>
|
||||
static bool GetInvokerForHash(int functionHash, RemoteCallType remoteCallType, out Invoker invoker) =>
|
||||
remoteCallDelegates.TryGetValue(functionHash, out invoker) &&
|
||||
invoker != null &&
|
||||
invoker.remoteCallType == remoteCallType;
|
||||
invoker.callType == remoteCallType;
|
||||
|
||||
// InvokeCmd/Rpc Delegate can all use the same function here
|
||||
internal static bool Invoke(int functionHash, RemoteCallType remoteCallType, NetworkReader reader, NetworkBehaviour component, NetworkConnectionToClient senderConnection = null)
|
||||
|
Loading…
Reference in New Issue
Block a user