UNPKG

arcade-physics

Version:
21 lines 1.65 kB
export = CreateFromTiles; /** * Creates a Sprite for every object matching the given tile indexes in the layer. You can * optionally specify if each tile will be replaced with a new tile after the Sprite has been * created. This is useful if you want to lay down special tiles in a level that are converted to * Sprites, but want to replace the tile itself with a floor tile or similar once converted. * * @function Phaser.Tilemaps.Components.CreateFromTiles * @since 3.0.0 * * @param {(number|number[])} indexes - The tile index, or array of indexes, to create Sprites from. * @param {?(number|number[])} replacements - The tile index, or array of indexes, to change a converted tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a one-to-one mapping with the indexes array. * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e. scene.make.sprite). * @param {Phaser.Scene} scene - The Scene to create the Sprites within. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use when determining the world XY * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. * * @return {Phaser.GameObjects.Sprite[]} An array of the Sprites that were created. */ declare function CreateFromTiles(indexes: (number | number[]), replacements: (number | number[]) | null, spriteConfig: Phaser.Types.GameObjects.Sprite.SpriteConfig, scene: Phaser.Scene, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): Phaser.GameObjects.Sprite[]; //# sourceMappingURL=CreateFromTiles.d.ts.map