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
ObjectTypewith the specified name and colorDeclaration
Swift
public init(color: Color)Parameters
colorThe 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 : BridgablePropertyParameters
colorThe color to use for the object type in tiled
propertiesThe properties to assign to the newly created
ObjectType -
Add the sequence of
BridgablePropertiesto theObjectTypeDeclaration
Swift
func and<S>(_ properties: S) -> ObjectType where S : Sequence, S.Element : BridgablePropertyParameters
propertiesThe additional properites
Return Value
A new instance of the object type
View on GitHub
ObjectType Structure Reference