From 0ad07a823cec6de4b1ca1563ec4292c5f8d20198 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Sat, 12 May 2018 18:55:32 +0200 Subject: Fix and improve docs, adds send_bytes --- doc/classes/MultiplayerAPI.xml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'doc/classes/MultiplayerAPI.xml') diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml index b2ed712554..f6950d0fbc 100644 --- a/doc/classes/MultiplayerAPI.xml +++ b/doc/classes/MultiplayerAPI.xml @@ -61,10 +61,21 @@ Method used for polling the MultiplayerAPI. - You only need to worry about this if you are using [memeber Node.custom_multplayer] override. + You only need to worry about this if you are using [member Node.custom_multplayer] override. SceneTree will poll the default MultiplayerAPI for you. + + + + + + + + + Sends the given raw [code]bytes[/code] to a specific peer identified by [code]id[/code] (see [method NetworkedMultiplayerPeer.set_target_peer]). Default ID is [code]0[/code], i.e. broadcast to all peers. + + @@ -78,7 +89,7 @@ - The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server()]) and will set root node's network mode to master (see NETWORK_MODE_* constants in [Node]), or it will become a regular peer with root node set to slave. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. + The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to master (see NETWORK_MODE_* constants in [Node]), or it will become a regular peer with root node set to slave. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. If [code]true[/code] the MultiplayerAPI's [member network_peer] refuses new incoming connections. @@ -109,9 +120,18 @@ Emitted whenever this MultiplayerAPI's [member network_peer] disconnects from a peer. Clients get notified when other clients disconnect from the same server. + + + + + + + Emitted whenever this MultiplayerAPI's [member network_peer] receive a [code]packet[/code] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet. + + - Emitted whenever this MultiplayerAPI's [member network_peer] disconnected from server. Only emitted on clients. + Emitted whenever this MultiplayerAPI's [member network_peer] disconnects from server. Only emitted on clients. -- cgit v1.2.3