BridgableProperty

public protocol BridgableProperty

Enables the implementer to provide the information required to automatically translate a tiled property and apply it to the game specific engine.

  • Captures which game engine object is the target for this property

    Declaration

    Swift

    associatedtype EngineObjectType : EngineObject
  • Convience propagation of the type used for most floats in the target game engine

    Declaration

    Swift

    typealias FloatType = EngineObjectType.EngineType.FloatType
  • Convience propagation of the type used to represent colors in the target game engine

    Declaration

    Swift

    typealias ColorType = EngineObjectType.EngineType.ColorType
  • The name of the property in Tiled

    Declaration

    Swift

    var tiledName: String { get }
  • The default value of the property in Tiled

    Declaration

    Swift

    var tiledDefault: PropertyValue { get }
  • The key path to be used to write the property on EngineObjectType

    Declaration

    Swift

    var engineObjectProperty: PartialKeyPath<EngineObjectType> { get }
  • apply(to:_:) Extension method

    Sets the appropriate property on the EngineObjectType instance supplied

    Declaration

    Swift

    func apply(to object: EngineObjectType, _ value: PropertyValue)

    Parameters

    object

    The object in the specialized engine that should be updated

    value

    The value to apply to its property

Available where Self : RawRepresentable, Self.RawValue == String

  • tiledName Default implementation

    Default Implementation

    The name of the property in Tiled

    Declaration

    Swift

    var tiledName: String { get }