Propertied
public protocol Propertied
Any TiledKit object that can have user defined properties, that supports writing of properties
-
The
Propertiesof the objectDeclaration
Swift
var properties: Properties { get } -
is(a:Extension method) Determines if the type of the propertied object matches the type supplied
Declaration
Swift
func `is`(a type: TiledType) -> BoolParameters
typeThe type(s) to be tested
Return Value
trueif it matches, false otherwise -
tiledTypeExtension methodThe type of the Propertied object
Declaration
Swift
var tiledType: TiledType { get } -
hasProperty(in:Extension method) Determines if the properties of the object include at least one of the properties in the supplied array
Declaration
Swift
func hasProperty<EngineProperty>(in properties: [EngineProperty]) -> Bool where EngineProperty : BridgablePropertyParameters
propertiesThe properties to check for
Return Value
trueif at least one of the properties exists -
subscript(dynamicMember:Extension method) Retreives a
Colorfrom an object that can have user properties dynamically.let fillColor : Color = layer.fillColor ?? Color.whiteDeclaration
Swift
subscript(dynamicMember member: String) -> Color? { get }Parameters
memberThe name of the property
Return Value
The
Colorvalue ornilif the property does not exist, or is not of the right type -
subscript(dynamicMember:Extension method) Retreives a
URLfrom an object that can have user properties dynamically.let levelTheme : URL? = layer.levelMP3Declaration
Swift
subscript(dynamicMember member: String) -> URL? { get }Parameters
memberThe name of the property
Return Value
The
URLvalue ornilif the property does not exist, or is not of the right type -
subscript(dynamicMember:Extension method) Retreives a
Doublefrom an object that can have user properties dynamically.let weight : Double = object.weight ?? 100.0Declaration
Swift
subscript(dynamicMember member: String) -> Double? { get }Parameters
memberThe name of the property
Return Value
The
Doublevalue ornilif the property does not exist, or is not of the right type -
subscript(dynamicMember:Extension method) Retreives a
Intfrom an object that can have user properties dynamically.let extraLives : Int = layer.bonusLives ?? 0Declaration
Swift
subscript(dynamicMember member: String) -> Int? { get }Parameters
memberThe name of the property
Return Value
The
Intvalue ornilif the property does not exist, or is not of the right type -
subscript(dynamicMember:Extension method) Retreives a
Boolfrom an object that can have user properties dynamically.let pausable : Bool = layer.pausable ?? trueDeclaration
Swift
subscript(dynamicMember member: String) -> Bool? { get }Parameters
memberThe name of the property
Return Value
The
Boolvalue ornilif the property does not exist, or is not of the right type -
subscript(dynamicMember:Extension method) Retreives a
Stringfrom an object that can have user properties dynamically.let gameOverText : String = layer.gameOverText ?? "Game Over"Declaration
Swift
subscript(dynamicMember member: String) -> String? { get }Parameters
memberThe name of the property
Return Value
The
Stringvalue ornilif the property does not exist, or is not of the right type
View on GitHub
Propertied Protocol Reference