private void UnpackRpc(byte[] buffer) { netvrkSerialization.unpackOutput output = netvrkSerialization.UnserializeRpc(buffer); ObjData data = objList[output.objectId]; int id = output.methodId; data.rpcMethods[id].Invoke(data.scripts[id], output.data); }
private void UnpackEvent(byte[] buffer, CSteamID remoteId) { netvrkSerialization.unpackOutput output = netvrkSerialization.UnserializeEvent(buffer); netvrkPlayer player = IsInPlayerList(remoteId); if (eventCall != null) { eventCall(output.eventId, output.data, player); } }
private void UnpackInternal(byte[] buffer, CSteamID remoteId) { netvrkSerialization.unpackOutput output = netvrkSerialization.UnserializeInternal(buffer); string methodName = objList[0].methods[output.methodId]; InternalData intData = new InternalData(); intData.remoteId = remoteId; intData.data = output.data; StartCoroutine(methodName, intData); }