[Net] New replication interface, spawner and synchronizer nodes.
Initial implementation of the MultiplayerReplicationInterface and its default implementation (SceneReplicationInterface). New MultiplayerSpawner node helps dealing with instantiation of scenes on remote peers (e.g. clients). It supports both custom spawns via a `_spawn_custom` virtual function, and optional auto-spawn of known scenes via a TypedArray<PackedScenes> property. New MultiplayerSynchornizer helps synchronizing states between the local and remote peers, supports both sync and spawn properties and is configured via a `SceneReplicationConfig` resource. It can also sync via path (i.e. without being spawned by a MultiplayerSpawner if both peers has it in tree, but will not send the spawn state in that case, only the sync one.
This commit is contained in:
parent
2e320dcf87
commit
d219547c96
29 changed files with 2011 additions and 1212 deletions
61
doc/classes/SceneReplicationConfig.xml
Normal file
61
doc/classes/SceneReplicationConfig.xml
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="SceneReplicationConfig" inherits="Resource" version="4.0">
|
||||
<brief_description>
|
||||
</brief_description>
|
||||
<description>
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_property">
|
||||
<return type="void" />
|
||||
<argument index="0" name="path" type="NodePath" />
|
||||
<argument index="1" name="index" type="int" default="-1" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_properties" qualifiers="const">
|
||||
<return type="NodePath[]" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="property_get_index" qualifiers="const">
|
||||
<return type="int" />
|
||||
<argument index="0" name="path" type="NodePath" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="property_get_spawn">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="path" type="NodePath" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="property_get_sync">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="path" type="NodePath" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="property_set_spawn">
|
||||
<return type="void" />
|
||||
<argument index="0" name="path" type="NodePath" />
|
||||
<argument index="1" name="enabled" type="bool" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="property_set_sync">
|
||||
<return type="void" />
|
||||
<argument index="0" name="path" type="NodePath" />
|
||||
<argument index="1" name="enabled" type="bool" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_property">
|
||||
<return type="void" />
|
||||
<argument index="0" name="path" type="NodePath" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
</class>
|
||||
Loading…
Add table
Add a link
Reference in a new issue