void RpcTargetBroadcastPlayerInput(int[] data, NetworkMessageInfo info) { LogPing(info); // Get new commands IEnumerable <Command> commands = CommandPacker.Unpack(data); // Add commands to queue foreach (var command in commands) { _messageQueue.Enqueue(new KeyValuePair <string, Command>(info.sender.guid, command)); } }
public void BroadcastPlayerInput(IEnumerable <Command> commands) { GetComponent <NetworkView>().RPC("RpcTargetBroadcastPlayerInput", RPCMode.Server, CommandPacker.Pack(commands)); }