mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
syntax & comments
This commit is contained in:
parent
6989f21817
commit
a4e6163f9f
@ -106,12 +106,13 @@ static bool GetInvokerForHash(int cmdHash, RemoteCallType remoteCallType, out In
|
|||||||
invoker.remoteCallType == remoteCallType;
|
invoker.remoteCallType == remoteCallType;
|
||||||
|
|
||||||
// InvokeCmd/Rpc Delegate can all use the same function here
|
// InvokeCmd/Rpc Delegate can all use the same function here
|
||||||
internal static bool InvokeHandlerDelegate(int cmdHash, RemoteCallType remoteCallType, NetworkReader reader, NetworkBehaviour invokingType, NetworkConnectionToClient senderConnection = null)
|
internal static bool InvokeHandlerDelegate(int cmdHash, RemoteCallType remoteCallType, NetworkReader reader, NetworkBehaviour component, NetworkConnectionToClient senderConnection = null)
|
||||||
{
|
{
|
||||||
if (GetInvokerForHash(cmdHash, remoteCallType, out Invoker invoker) &&
|
if (GetInvokerForHash(cmdHash, remoteCallType, out Invoker invoker) &&
|
||||||
invoker.invokeClass.IsInstanceOfType(invokingType))
|
invoker.invokeClass.IsInstanceOfType(component))
|
||||||
{
|
{
|
||||||
invoker.invokeFunction(invokingType, reader, senderConnection);
|
// invoke function on this component
|
||||||
|
invoker.invokeFunction(component, reader, senderConnection);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user