Class TileMapRuntimeManager
Methods
getOrLoadSimpleTileMap
- getOrLoadSimpleTileMap(tileMapAsJsObject, objectName, tileSize, columnCount, rowCount, callback): void
Parameters
- tileMapAsJsObject: EditableTileMapAsJsObject
- objectName: string
- tileSize: number
- columnCount: number
- rowCount: number
- callback: ((tileMap) => void)
- (tileMap): void
Returns void
Returns void
getOrLoadSimpleTileMapTextureCache
- getOrLoadSimpleTileMapTextureCache(getTexture, atlasImageResourceName, tileSize, columnCount, rowCount, callback, errorCallback): void
Parameters
- getTexture: ((textureName) => BaseTexture<Resource, IAutoDetectOptions>)
- (textureName): BaseTexture<Resource, IAutoDetectOptions>
Returns BaseTexture<Resource, IAutoDetectOptions>
- atlasImageResourceName: string
- tileSize: number
- columnCount: number
- rowCount: number
- callback: ((textureCache) => void)
- (textureCache): void
Parameters
- textureCache: null | TileTextureCache
Returns void
- errorCallback: ((error) => void)
- (error): void
Returns void
Returns void
getOrLoadTextureCache
- getOrLoadTextureCache(getTexture, atlasImageResourceName, tileMapJsonResourceName, tileSetJsonResourceName, levelIndex, callback): void
Parameters
- getTexture: ((textureName) => BaseTexture<Resource, IAutoDetectOptions>)
- (textureName): BaseTexture<Resource, IAutoDetectOptions>
Returns BaseTexture<Resource, IAutoDetectOptions>
- atlasImageResourceName: string
- tileMapJsonResourceName: string
- tileSetJsonResourceName: string
- levelIndex: number
- callback: ((textureCache) => void)
- (textureCache): void
Parameters
- textureCache: null | TileTextureCache
Returns void
Returns void
getOrLoadTileMap
- getOrLoadTileMap(tileMapJsonResourceName, tileSetJsonResourceName, levelIndex, callback): void
Parameters
- tileMapJsonResourceName: string
- tileSetJsonResourceName: string
- levelIndex: number
- callback: ((tileMapFileContent) => void)
- (tileMapFileContent): void
Parameters
- tileMapFileContent: null | EditableTileMap
Returns void
Returns void
A holder to share tile maps across the 2 extension objects.
Every instance with the same files path in properties will share the same EditableTileMap and TileTextureCache.
To use a tile map with collisions, a user can create 4 objects:
To avoid to have 4 copies of the same tile map in memory, this manager puts the tile map in cache and avoid unnecessary parsing.
See
TileMapManager