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 shapeboundingRect: the node’s bounding rectboundsShape: the node’s rect shaperenderQuality: render scaling qualityvisibleToCamera: 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
CGPathdefining 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) -> BoolParameters
touchpoint 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
offsetoffset to be applied to each point.
Return Value
array of points.
-
Refresh the node’s content.
Declaration
Swift
@objc optional func draw()
-
shaderUniformsExtension methodReturns an array of shader unforms based on the current attributes.
Declaration
Swift
public var shaderUniforms: [SKUniform] { get }
View on GitHub
Install in Dash
TiledGeometryType Protocol Reference