syntax & comments

This commit is contained in:
vis2k 2022-01-18 15:51:16 +08:00
parent 6989f21817
commit a4e6163f9f

View File

@ -106,12 +106,13 @@ static bool GetInvokerForHash(int cmdHash, RemoteCallType remoteCallType, out In
invoker.remoteCallType == remoteCallType;
// 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) &&
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 false;