Classes

The following classes are available globally.

  • Stores the tiles for a map so that they can be retreived as layers and objects are created

    See more

    Declaration

    Swift

    public class MapTiles<EngineType> where EngineType : Engine
  • Projects are the primary entry point for TiledKit. The project represents the root of all Maps and TileSets and the resources (such as images) that support them. The default Project will use the main Bundle as its root, making it very easy to include in a Swift Package Manager or Xcode module.

        let myMap = Project.default.get("mymap")
    

    The above code will retrieve a file named ‘mymap.tmx’ from the root of the main Bundle. You may create instances of Projects that have a different root (such as an actual Tiled project directory, or different Bundle) using the standard constructurs.

    Projects are critical as they enable the relative processing of any resources referenced in the Tiled files and provide the key entry point for specializing TiledKit for a a specific game engine. Specializations only require the registration of a specific ResourceLoader for the type of object required by the game engine. See SKTiledKit for an example of a specialization.

    Projects also provide resource caching capabilities, ensuring that the contents of any URL are loaded only once. If you add your own ResourceLoader for types you can specify that if the created object should be cached or not.

    See more

    Declaration

    Swift

    public class Project
  • A Tile represents a 2D image that should be rendered when referenced on by an Object or Layer. It contains a reference to the image, and the portion of that image that should be used to generate the image.

    See more

    Declaration

    Swift

    public class Tile : Propertied, Equatable
  • A TileSet represents a Tiled tile set, most typically loaded as part of loading a Map.

    See more

    Declaration

    Swift

    public class TileSet : Loadable, MutablePropertied