TiledGeometryType

@objc
public protocol TiledGeometryType : DebugDrawableType, TiledObjectType, TiledRasterizableType, TiledSelectableType

The TiledGeometryType protocol describes a drawable type used to manage and render Tiled geometry objects.

Properties

  • objectPath: the node’s bounding shape
  • boundingRect: the node’s bounding rect
  • boundsShape: the node’s rect shape
  • renderQuality: render scaling quality
  • visibleToCamera: node is visible to camera

Methods

  • contains(touch: CGPoint): returns true if a point is contained in this shape’s frame.
  • getVertices(offset: CGPoint): return’s the node’s shape points.
  • draw(): draw the object’s contents.
  • The object’s parent container.

    Declaration

    Swift

    @objc
    optional var container: TiledMappableGeometryType? { get }
  • This object’s CGPath defining the shape of geometry. Used to draw the bounding shape.

    Declaration

    Swift

    @objc
    var objectPath: CGPath { get }
  • Object bounding box shape.

    Declaration

    Swift

    @objc
    var boundsShape: SKShapeNode? { get set }
  • Object bounding rectangle, in local space.

    Declaration

    Swift

    @objc
    var boundingRect: CGRect { get }
  • Object anchor node visualization node.

    Declaration

    Swift

    @objc
    var anchorShape: SKShapeNode { get set }
  • Render scaling property.

    Declaration

    Swift

    @objc
    var renderQuality: CGFloat { get set }
  • The object is visible to scene cameras.

    Declaration

    Swift

    @objc
    var visibleToCamera: Bool { get set }
  • Indicates the node has been touched, either by mouse or touch event.

    Declaration

    Swift

    @objc
    func contains(touch: CGPoint) -> Bool

    Parameters

    touch

    point in this node.

    Return Value

    node was touched.

  • Returns the points representing the object’s bounding shape - translated with the current map orientation.

    Declaration

    Swift

    @objc
    func getVertices(offset: CGPoint) -> [CGPoint]

    Parameters

    offset

    offset to be applied to each point.

    Return Value

    array of points.

  • Refresh the node’s content.

    Declaration

    Swift

    @objc
    optional func draw()

Extensions

  • shaderUniforms Extension method

    Returns an array of shader unforms based on the current attributes.

    Declaration

    Swift

    public var shaderUniforms: [SKUniform] { get }