Signal1
Signal support.
MultiplayerSynchronizer.swift:631class Signal1
Use the connect(flags:_:)
method to connect to the signal on the container object, and disconnect(_:)
to drop the connection.
You can also await the emitted
property for waiting for a single emission of the signal.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (16) members.
Types
Type members
Instance members
var deltaInterval: Double
Time interval between delta synchronizations. When set to
0.0
(the default), delta synchronizations happen every network process frame.var deltaSynchronized: SimpleSignal
Emitted when a new delta synchronization state is received by this synchronizer after the properties have been updated.
var publicVisibility: Bool
Whether synchronization should be visible to all peers by default. See
setVisibilityFor(peer:visible:)
andaddVisibilityFilter(_:)
for ways of configuring fine-grained visibility options.var replicationConfig: SceneReplicationConfig?
Resource containing which properties to synchronize.
var replicationInterval: Double
Time interval between synchronizations. When set to
0.0
(the default), synchronizations happen every network process frame.var rootPath: NodePath
Node path that replicated properties are relative to.
var synchronized: SimpleSignal
Emitted when a new synchronization state is received by this synchronizer after the properties have been updated.
var visibilityChanged: Signal1
Emitted when visibility of
forPeer
is updated. SeeupdateVisibility(forPeer:)
.var visibilityUpdateMode: MultiplayerSynchronizer.VisibilityUpdateMode
Specifies when visibility filters are updated (see
VisibilityUpdateMode
for options).func addVisibilityFilter(Callable
) Adds a peer visibility filter for this synchronizer.
func getVisibilityFor(peer: Int32
) -> Bool Queries the current visibility for peer
peer
.func removeVisibilityFilter(Callable
) Removes a peer visibility filter from this synchronizer.
func setVisibilityFor(peer: Int32, visible: Bool
) Sets the visibility of
peer
tovisible
. Ifpeer
is0
, the value ofpublicVisibility
will be updated instead.func updateVisibility(forPeer: Int32
) Updates the visibility of
forPeer
according to visibility filters. IfforPeer
is0
(the default), all peers’ visibilties are updated.
Citizens in SwiftGodot
Instance members
var emitted: Void
You can await this property to wait for the signal to be emitted once
func connect(flags: Object.ConnectFlags, @escaping (_ forPeer: Int64) -> ()
) -> Object Connects the signal to the specified callback
func disconnect(Object
) Disconnects a signal that was previously connected, the return value from calling
connect(flags:_:)