0.2.0-dev Download ZIP
119 lines ·5.2 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="SceneReplicationConfig" inherits="Resource" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> |
| 3 | <brief_description> |
| 4 | Configuration for properties to synchronize with a [MultiplayerSynchronizer]. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | </description> |
| 8 | <tutorials> |
| 9 | </tutorials> |
| 10 | <methods> |
| 11 | <method name="add_property"> |
| 12 | <return type="void" /> |
| 13 | <param index="0" name="path" type="NodePath" /> |
| 14 | <param index="1" name="index" type="int" default="-1" /> |
| 15 | <description> |
| 16 | Adds the property identified by the given [param path] to the list of the properties being synchronized, optionally passing an [param index]. |
| 17 | [b]Note:[/b] For details on restrictions and limitations on property synchronization, see [MultiplayerSynchronizer]. |
| 18 | </description> |
| 19 | </method> |
| 20 | <method name="get_properties" qualifiers="const"> |
| 21 | <return type="NodePath[]" /> |
| 22 | <description> |
| 23 | Returns a list of synchronized property [NodePath]s. |
| 24 | </description> |
| 25 | </method> |
| 26 | <method name="has_property" qualifiers="const"> |
| 27 | <return type="bool" /> |
| 28 | <param index="0" name="path" type="NodePath" /> |
| 29 | <description> |
| 30 | Returns [code]true[/code] if the given [param path] is configured for synchronization. |
| 31 | </description> |
| 32 | </method> |
| 33 | <method name="property_get_index" qualifiers="const"> |
| 34 | <return type="int" /> |
| 35 | <param index="0" name="path" type="NodePath" /> |
| 36 | <description> |
| 37 | Finds the index of the given [param path]. |
| 38 | </description> |
| 39 | </method> |
| 40 | <method name="property_get_replication_mode"> |
| 41 | <return type="int" enum="SceneReplicationConfig.ReplicationMode" /> |
| 42 | <param index="0" name="path" type="NodePath" /> |
| 43 | <description> |
| 44 | Returns the replication mode for the property identified by the given [param path]. |
| 45 | </description> |
| 46 | </method> |
| 47 | <method name="property_get_spawn"> |
| 48 | <return type="bool" /> |
| 49 | <param index="0" name="path" type="NodePath" /> |
| 50 | <description> |
| 51 | Returns [code]true[/code] if the property identified by the given [param path] is configured to be synchronized on spawn. |
| 52 | </description> |
| 53 | </method> |
| 54 | <method name="property_get_sync" deprecated="Use [method property_get_replication_mode] instead."> |
| 55 | <return type="bool" /> |
| 56 | <param index="0" name="path" type="NodePath" /> |
| 57 | <description> |
| 58 | Returns [code]true[/code] if the property identified by the given [param path] is configured to be synchronized on process. |
| 59 | </description> |
| 60 | </method> |
| 61 | <method name="property_get_watch" deprecated="Use [method property_get_replication_mode] instead."> |
| 62 | <return type="bool" /> |
| 63 | <param index="0" name="path" type="NodePath" /> |
| 64 | <description> |
| 65 | Returns [code]true[/code] if the property identified by the given [param path] is configured to be reliably synchronized when changes are detected on process. |
| 66 | </description> |
| 67 | </method> |
| 68 | <method name="property_set_replication_mode"> |
| 69 | <return type="void" /> |
| 70 | <param index="0" name="path" type="NodePath" /> |
| 71 | <param index="1" name="mode" type="int" enum="SceneReplicationConfig.ReplicationMode" /> |
| 72 | <description> |
| 73 | Sets the synchronization mode for the property identified by the given [param path]. |
| 74 | </description> |
| 75 | </method> |
| 76 | <method name="property_set_spawn"> |
| 77 | <return type="void" /> |
| 78 | <param index="0" name="path" type="NodePath" /> |
| 79 | <param index="1" name="enabled" type="bool" /> |
| 80 | <description> |
| 81 | Sets whether the property identified by the given [param path] is configured to be synchronized on spawn. |
| 82 | </description> |
| 83 | </method> |
| 84 | <method name="property_set_sync" deprecated="Use [method property_set_replication_mode] with [constant REPLICATION_MODE_ALWAYS] instead."> |
| 85 | <return type="void" /> |
| 86 | <param index="0" name="path" type="NodePath" /> |
| 87 | <param index="1" name="enabled" type="bool" /> |
| 88 | <description> |
| 89 | Sets whether the property identified by the given [param path] is configured to be synchronized on process. |
| 90 | </description> |
| 91 | </method> |
| 92 | <method name="property_set_watch" deprecated="Use [method property_set_replication_mode] with [constant REPLICATION_MODE_ON_CHANGE] instead."> |
| 93 | <return type="void" /> |
| 94 | <param index="0" name="path" type="NodePath" /> |
| 95 | <param index="1" name="enabled" type="bool" /> |
| 96 | <description> |
| 97 | Sets whether the property identified by the given [param path] is configured to be reliably synchronized when changes are detected on process. |
| 98 | </description> |
| 99 | </method> |
| 100 | <method name="remove_property"> |
| 101 | <return type="void" /> |
| 102 | <param index="0" name="path" type="NodePath" /> |
| 103 | <description> |
| 104 | Removes the property identified by the given [param path] from the configuration. |
| 105 | </description> |
| 106 | </method> |
| 107 | </methods> |
| 108 | <constants> |
| 109 | <constant name="REPLICATION_MODE_NEVER" value="0" enum="ReplicationMode"> |
| 110 | Do not keep the given property synchronized. |
| 111 | </constant> |
| 112 | <constant name="REPLICATION_MODE_ALWAYS" value="1" enum="ReplicationMode"> |
| 113 | Replicate the given property on process by constantly sending updates using unreliable transfer mode. |
| 114 | </constant> |
| 115 | <constant name="REPLICATION_MODE_ON_CHANGE" value="2" enum="ReplicationMode"> |
| 116 | Replicate the given property on process by sending updates using reliable transfer mode when its value changes. |
| 117 | </constant> |
| 118 | </constants> |
| 119 | </class> |