diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/File.xml | 4 | ||||
-rw-r--r-- | doc/classes/MultiplayerAPI.xml | 9 | ||||
-rw-r--r-- | doc/classes/SceneTree.xml | 4 |
3 files changed, 10 insertions, 7 deletions
diff --git a/doc/classes/File.xml b/doc/classes/File.xml index bd368e967a..78aa1b1a61 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -9,13 +9,13 @@ [codeblock] func save(content): var file = File.new() - file.open("user://save_game.dat", file.WRITE) + file.open("user://save_game.dat", File.WRITE) file.store_string(content) file.close() func load(): var file = File.new() - file.open("user://save_game.dat", file.READ) + file.open("user://save_game.dat", File.READ) var content = file.get_as_text() file.close() return content diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml index 31904631a9..8c114a55c9 100644 --- a/doc/classes/MultiplayerAPI.xml +++ b/doc/classes/MultiplayerAPI.xml @@ -60,9 +60,8 @@ <return type="void"> </return> <description> - Method used for polling the MultiplayerAPI. - You only need to worry about this if you are using [member Node.custom_multiplayer] override. - SceneTree will poll the default MultiplayerAPI for you. + Method used for polling the MultiplayerAPI. You only need to worry about this if you are using [member Node.custom_multiplayer] override or you set [member SceneTree.multiplayer_poll] to [code]false[/code]. By default [SceneTree] will poll its MultiplayerAPI for you. + NOTE: This method results in RPCs and RSETs being called, so they will be executed in the same context of this function (e.g. [code]_process[/code], [code]physics[/code], [Thread]). </description> </method> <method name="send_bytes"> @@ -143,7 +142,7 @@ Used with [method Node.rpc_config] or [method Node.rset_config] to set a method to be called or a property to be changed only on the remote end, not locally. Analogous to the [code]remote[/code] keyword. Calls and property changes are accepted from all remote peers, no matter if they are node's master or slaves. </constant> <constant name="RPC_MODE_SYNC" value="2" enum="RPCMode"> - Behave like [constant RPC_MODE_REMOTE] but also make the call or property change locally. Analogous to the [code]sync[/code] keyword. + Behave like [code]RPC_MODE_REMOTE[/code] but also make the call or property change locally. Analogous to the [code]sync[/code] keyword. </constant> <constant name="RPC_MODE_MASTER" value="3" enum="RPCMode"> Used with [method Node.rpc_config] or [method Node.rset_config] to set a method to be called or a property to be changed only on the network master for this node. Analogous to the [code]master[/code] keyword. Only accepts calls or property changes from the node's network slaves, see [method Node.set_network_master]. @@ -152,7 +151,7 @@ Used with [method Node.rpc_config] or [method Node.rset_config] to set a method to be called or a property to be changed only on slaves for this node. Analogous to the [code]slave[/code] keyword. Only accepts calls or property changes from the node's network master, see [method Node.set_network_master]. </constant> <constant name="RPC_MODE_REMOTESYNC" value="5" enum="RPCMode"> - Behave like [code]RPC_MODE_REMOTE[/code] but also make the call or property change locally. Same as [constant RPC_MODE_SYNC] which is only kept for compatibility. Analogous to the [code]remotesync[/code] keyword. + Behave like [code]RPC_MODE_REMOTE[/code] but also make the call or property change locally. Same as [code]RPC_MODE_SYNC[/code] which is only kept for compatibility. Analogous to the [code]remotesync[/code] keyword. </constant> <constant name="RPC_MODE_MASTERSYNC" value="6" enum="RPCMode"> Behave like [code]RPC_MODE_MASTER[/code] but also make the call or property change locally. Analogous to the [code]mastersync[/code] keyword. diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index b2cde861c8..7c8feae5b3 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -269,6 +269,10 @@ <member name="multiplayer" type="MultiplayerAPI" setter="set_multiplayer" getter="get_multiplayer"> The default [MultiplayerAPI] instance for this SceneTree. </member> + <member name="multiplayer_poll" type="bool" setter="set_multiplayer_poll_enabled" getter="is_multiplayer_poll_enabled"> + If [code]true[/code] (default) enable the automatic polling of the [MultiplayerAPI] for this SceneTree during [signal idle_frame]. + When [code]false[/code] you need to manually call [method MultiplayerAPI.poll] for processing network packets and delivering RPCs/RSETs. This allows to run RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protecion when accessing the [MultiplayerAPI] from threads. + </member> <member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer"> The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the SceneTree 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 SceneTree's signals. </member> |