Signal1
Signal support.
AnimationNodeBlendTree.swift:367class 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 (18) members.
Type members
static let connectionErrorConnectionExists: Int
The specified connection already exists.
static let connectionErrorNoInput: Int
The input node is
null
.static let connectionErrorNoInputIndex: Int
The specified input port is out of range.
static let connectionErrorNoOutput: Int
The output node is
null
.static let connectionErrorSameNode: Int
Input and output nodes are the same.
static let connectionOk: Int
The connection was successful.
class var godotClassName: StringName
Instance members
var graphOffset: Vector2
The global offset of all sub animation nodes.
var nodeChanged: Signal1
Emitted when the input port information is changed.
func addNode(name: StringName, node: AnimationNode?, position: Vector2
) Adds an
AnimationNode
at the givenposition
. Thename
is used to identify the created sub animation node later.func connectNode(inputNode: StringName, inputIndex: Int32, outputNode: StringName
) Connects the output of an
AnimationNode
as input for anotherAnimationNode
, at the input port specified byinputIndex
.func disconnectNode(inputNode: StringName, inputIndex: Int32
) Disconnects the animation node connected to the specified input.
func getNode(name: StringName
) -> AnimationNode? Returns the sub animation node with the specified
name
.func getNodePosition(name: StringName
) -> Vector2 Returns the position of the sub animation node with the specified
name
.func hasNode(name: StringName
) -> Bool Returns
true
if a sub animation node with specifiedname
exists.func removeNode(name: StringName
) Removes a sub animation node.
func renameNode(name: StringName, newName: StringName
) Changes the name of a sub animation node.
func setNodePosition(name: StringName, position: Vector2
) Modifies the position of a sub animation node.
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 (_ nodeName: StringName) -> ()
) -> 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:_:)