Signal2
Signal support.
AnimationNode.swift:823class Signal2
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 (28) members.
Types
enum FilterAction
class Signal1
Signal support.
Type members
Instance members
var animationNodeRemoved: Signal2
Emitted by nodes that inherit from this class and that have an internal tree when one of their animation nodes removes. The animation nodes that emit this signal are
AnimationNodeBlendSpace1D
,AnimationNodeBlendSpace2D
,AnimationNodeStateMachine
, andAnimationNodeBlendTree
.var animationNodeRenamed: Signal1
Emitted by nodes that inherit from this class and that have an internal tree when one of their animation node names changes. The animation nodes that emit this signal are
AnimationNodeBlendSpace1D
,AnimationNodeBlendSpace2D
,AnimationNodeStateMachine
, andAnimationNodeBlendTree
.var filterEnabled: Bool
If
true
, filtering is enabled.var treeChanged: SimpleSignal
Emitted by nodes that inherit from this class and that have an internal tree when one of their animation nodes changes. The animation nodes that emit this signal are
AnimationNodeBlendSpace1D
,AnimationNodeBlendSpace2D
,AnimationNodeStateMachine
,AnimationNodeBlendTree
andAnimationNodeTransition
.func addInput(name: String
) -> Bool Adds an input to the animation node. This is only useful for animation nodes created for use in an
AnimationNodeBlendTree
. If the addition fails, returnsfalse
.func blendAnimation(StringName, time: Double, delta: Double, seeked: Bool, isExternalSeeking: Bool, blend: Double, loopedFlag: Animation.LoopedFlag
) Blend an animation by
blend
amount (name must be valid in the linkedAnimationPlayer
). Atime
anddelta
may be passed, as well as whetherseeked
happened.func blendInput(inputIndex: Int32, time: Double, seek: Bool, isExternalSeeking: Bool, blend: Double, filter: AnimationNode.FilterAction, sync: Bool, testOnly: Bool
) -> Double Blend an input. This is only useful for animation nodes created for an
AnimationNodeBlendTree
. Thetime
parameter is a relative delta, unlessseek
istrue
, in which case it is absolute. A filter mode may be optionally passed (seeFilterAction
for options).func blendNode(name: StringName, node: AnimationNode?, time: Double, seek: Bool, isExternalSeeking: Bool, blend: Double, filter: AnimationNode.FilterAction, sync: Bool, testOnly: Bool
) -> Double Blend another animation node (in case this animation node contains children animation nodes). This function is only useful if you inherit from
AnimationRootNode
instead, else editors will not display your animation node for addition.func findInput(name: String
) -> Int32 Returns the input index which corresponds to
name
. If not found, returns-1
.func getInputCount(
) -> Int32 Amount of inputs in this animation node, only useful for animation nodes that go into
AnimationNodeBlendTree
.func getInputName(input: Int32
) -> String Gets the name of an input by index.
func getParameter(name: StringName
) -> Variant Gets the value of a parameter. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees.
func isPathFiltered(path: NodePath
) -> Bool Returns whether the given path is filtered.
func removeInput(index: Int32
) Removes an input, call this only when inactive.
func setFilterPath(NodePath, enable: Bool
) Adds or removes a path for the filter.
func setInputName(input: Int32, name: String
) -> Bool Sets the name of the input at the given
input
index. If the setting fails, returnsfalse
.func setParameter(name: StringName, value: Variant
) Sets a custom parameter. These are used as local memory, because resources can be reused across the tree or scenes.
Show implementation details (8)
Hide implementation details
func _getCaption(
) -> String When inheriting from
AnimationRootNode
, implement this virtual method to override the text caption for this animation node.func _getChildByName(StringName
) -> AnimationNode? When inheriting from
AnimationRootNode
, implement this virtual method to return a child animation node by itsname
.func _getChildNodes(
) -> GDictionary When inheriting from
AnimationRootNode
, implement this virtual method to return all children animation nodes in order as aname: node
dictionary.func _getParameterDefaultValue(parameter: StringName
) -> Variant When inheriting from
AnimationRootNode
, implement this virtual method to return the default value of aparameter
. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees.func _getParameterList(
) -> GArray When inheriting from
AnimationRootNode
, implement this virtual method to return a list of the properties on this animation node. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. Format is similar togetPropertyList
.func _hasFilter(
) -> Bool When inheriting from
AnimationRootNode
, implement this virtual method to return whether the blend tree editor should display filter editing on this animation node.func _isParameterReadOnly(parameter: StringName
) -> Bool When inheriting from
AnimationRootNode
, implement this virtual method to return whether theparameter
is read-only. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees.func _process(time: Double, seek: Bool, isExternalSeeking: Bool, testOnly: Bool
) -> Double When inheriting from
AnimationRootNode
, implement this virtual method to run some code when this animation node is processed. Thetime
parameter is a relative delta, unlessseek
istrue
, in which case it is absolute.
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 (_ objectId: Int64, _ name: String) -> ()
) -> 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:_:)