Protocols

The following protocols are available globally.

  • Any TiledKit object that can have user defined properties, that supports writing of properties

    See more

    Declaration

    Swift

    public protocol Propertied
  • Ensures a Tiled “float” can be converted into an Engine specific property value

    See more

    Declaration

    Swift

    public protocol ExpressibleAsTiledFloat
  • Ensures a Tiled “color” can be converted into an Engine specific property value

    See more

    Declaration

    Swift

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

    See more

    Declaration

    Swift

    public protocol BridgableProperty
  • An object that can create new instances that are deep copies of itself

    See more

    Declaration

    Swift

    public protocol DeepCopyable
  • The entry point for any game engine specialization. See Game Engine Specialization

    See more

    Declaration

    Swift

    public protocol Engine
  • A concrete object that the implementor of will be able to be directly bridged to a TiledKit map with a high level of automation

    See more

    Declaration

    Swift

    public protocol EngineMap : EngineLayerContainer, Loadable
  • Captures an object that is important for a given game engine (and will be involved in automated maping etc). In general only game engine types that map directly to Tiled entities will need to support this

    See more

    Declaration

    Swift

    public protocol EngineObject
  • Container that can contain sprites and tiles

    See more

    Declaration

    Swift

    public protocol EngineSpriteContainer : EngineObject
  • Container that can contain objects

    See more

    Declaration

    Swift

    public protocol EngineObjectContainer : EngineSpriteContainer
  • Layer containers can contain other elements or layers.

    See more

    Declaration

    Swift

    public protocol EngineLayerContainer : EngineObject
  • Producers are responsible for creating and post-processing Engine specific objects representing Tiled objects. Engine implementors must provide basic similar funcitonality but those can be the most generic realizations of Tiled objects, with specific producers created to perform more specialized work, stopping Engines from becoming overly complex in a single type.

    Declaration

    Swift

    public protocol Producer : EngineObject
  • By implementing this protocol (required for Engine.TextureType loading behaviour except the actual loading of the texture data will be provided

    See more

    Declaration

    Swift

    public protocol EngineTexture : EngineObject, Loadable
  • Undocumented

    See more

    Declaration

    Swift

    public protocol LayerFactory : Producer
  • A Factory responsible for creating an Engine Map

    See more

    Declaration

    Swift

    public protocol MapFactory : Producer
  • Tile factories create the sprites that will be rendered for tiles

    See more

    Declaration

    Swift

    public protocol ObjectFactory : Producer
  • Tile factories create the sprites that will be rendered for tiles

    See more

    Declaration

    Swift

    public protocol TileFactory : Producer
  • This type should not be implemented outside of TiledKit and is used solely pass information about the current project to the Engines load texture implementation. Outside of TiledKit you should use the automatically provided Engine.load(textureFrom url:URL, project: Project) method

    See more

    Declaration

    Swift

    public protocol EngineImageLoader
  • A specialized form of a PostProcessor that applies to Tiles. It is called after the first factory has created the specialized sprite for the tile

    See more

    Declaration

    Swift

    public protocol LayerPostProcessor : Producer
  • A specialized form of a PostProcessor that applies to Maps. It is called after all Layers and Objects have been made and processed

    See more

    Declaration

    Swift

    public protocol MapPostProcessor : Producer
  • A specialized form of a PostProcessor that applies to Tiles. It is called after the first factory has created the specialized sprite for the tile

    See more

    Declaration

    Swift

    public protocol ObjectPostProcessor : Producer
  • A specialized form of a PostProcessor that applies to Tiles. It is called after the first factory has created the specialized sprite for the tile

    See more

    Declaration

    Swift

    public protocol TilePostProcessor : Producer
  • Implemented by any object that can contain Layers (such as a Map)

    See more

    Declaration

    Swift

    public protocol LayerContainer
  • A LayerFilter is used when querying LayerContainers to select one or more matching Layers and are responsible for determining if any given Layer meets a set of criteria

    See more

    Declaration

    Swift

    public protocol LayerFilter
  • All Layer types, or types that represent specialisations of Layer implement this common set of properties.

    See more

    Declaration

    Swift

    public protocol LayerProtocol : Propertied
  • An ObjectFilter is used when querying LayerContainers to select one or more matching Objectss and are responsible for determining if any given Object meets a set of criteria

    See more

    Declaration

    Swift

    public protocol ObjectFilter
  • Undocumented

    See more

    Declaration

    Swift

    public protocol ObjectProtocol : Propertied
  • Implemented by any type that wants to be loaded (and cached, and instanced) through the TiledKit Project system. This makes it very easy to extend to a specific game engine.

    See more

    Declaration

    Swift

    public protocol Loadable
  • You can extend the range of resources and even the way resources are loaded by implementing your own ResourceLoader.

    See more

    Declaration

    Swift

    public protocol ResourceLoader
  • Any TiledKit object that can have user defined properties, that supports writing of properties

    See more

    Declaration

    Swift

    public protocol MutablePropertied : Propertied