Inserts a node into a specific position in the receiver’s list of child nodes.
On This Page
func insertChild(_ node: SKNode, at index: Int)
The node to add. The node must not already have a parent.
The position in the array to insert the node.
See the objects and functions you use to control the node tree's composition.
Adds a node to the end of the receiver’s list of child nodes.
func isEqual(to: SKNode) -> Bool
Compares the parameter node to the receiving node.
func move(toParent: SKNode)
Moves the node to a new parent node in the scene.
Removes the receiving node from its parent.
Removes all of the node’s children.
func removeChildren(in: [SKNode])
Removes a list of children from the receiving node.
func inParentHierarchy(SKNode) -> Bool
Returns a Boolean value that indicates whether the node is a descendant of the target node.
var children: [SKNode]
The node’s children.
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.