Node

@objcMembers
open class Node : MaskNode

Undocumented

  • Undocumented

    Declaration

    Swift

    public lazy var label: SKMultilineLabelNode { get set }
  • Undocumented

    Declaration

    Swift

    public lazy var sprite: SKSpriteNode { get set }
  • The text displayed by the node.

    Declaration

    Swift

    open var text: String? { get set }
  • The image displayed by the node.

    Declaration

    Swift

    open var image: UIImage? { get set }
  • The color of the node.

    Also blends the color with the image.

    Declaration

    Swift

    open var color: UIColor { get set }
  • Undocumented

    Declaration

    Swift

    override open var strokeColor: UIColor { get set }
  • The selection state of the node.

    Declaration

    Swift

    open var isSelected: Bool { get set }
  • Creates a node with a custom path.

    Declaration

    Swift

    public init(text: String?, image: UIImage?, color: UIColor, path: CGPath, marginScale: CGFloat = 1.01)

    Parameters

    text

    The text of the node.

    image

    The image of the node.

    color

    The color of the node.

    path

    The path of the node.

    marginScale

    The margin scale of the node.

    Return Value

    A new node.

  • Creates a node with a circular path.

    Declaration

    Swift

    public convenience init(text: String?, image: UIImage?, color: UIColor, radius: CGFloat, marginScale: CGFloat = 1.01)

    Parameters

    text

    The text of the node.

    image

    The image of the node.

    color

    The color of the node.

    radius

    The radius of the node.

    marginScale

    The margin scale of the node.

    Return Value

    A new node.

  • Undocumented

    Declaration

    Swift

    required public init?(coder aDecoder: NSCoder)
  • Undocumented

    Declaration

    Swift

    open func configure(text: String?, image: UIImage?, color: UIColor)
  • Undocumented

    Declaration

    Swift

    override open func removeFromParent()
  • The animation to execute when the node is selected.

    Declaration

    Swift

    open func selectedAnimation()
  • The animation to execute when the node is deselected.

    Declaration

    Swift

    open func deselectedAnimation()
  • The animation to execute when the node is removed.

    Important

    You must call the completion block.

    Declaration

    Swift

    open func removedAnimation(completion: @escaping () -> Void)

    Parameters

    completion

    The block to execute when the animation is complete. You must call this handler and should do so as soon as possible.