ObjectType
public struct ObjectType
An ObjectType
captures a set of properties and their default values that can be applied to any
Tiled object
-
Retrieves or sets the named property
Declaration
Swift
public subscript(name: String) -> PropertyValue? { get set }
-
The color objects of this type should be rendered in
Declaration
Swift
public var color: Color
-
Returns all of the property names
Declaration
Swift
public var allPropertyNames: [String] { get }
-
Creates a new instance of
ObjectType
with the specified name and colorDeclaration
Swift
public init(color: Color)
Parameters
color
The color of the object type
-
Creates an object type based on a list of bridgeable properties
Declaration
Swift
init<S>(_ color: Color, with properties: S) where S : Sequence, S.Element : BridgableProperty
Parameters
color
The color to use for the object type in tiled
properties
The properties to assign to the newly created
ObjectType
-
Add the sequence of
BridgableProperties
to theObjectType
Declaration
Swift
func and<S>(_ properties: S) -> ObjectType where S : Sequence, S.Element : BridgableProperty
Parameters
properties
The additional properites
Return Value
A new instance of the object type