UNPKG

arcade-physics

Version:
25 lines 1.34 kB
export = FindByIndex; /** * @author Richard Davey <rich@photonstorm.com> * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Searches the entire map layer for the first tile matching the given index, then returns that Tile * object. If no match is found, it returns null. The search starts from the top-left tile and * continues horizontally until it hits the end of the row, then it drops down to the next column. * If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to * the top-left. * * @function Phaser.Tilemaps.Components.FindByIndex * @since 3.0.0 * * @param {number} index - The tile index value to search for. * @param {number} skip - The number of times to skip a matching tile before returning. * @param {boolean} reverse - If true it will scan the layer in reverse, starting at the bottom-right. Otherwise it scans from the top-left. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. * * @return {?Phaser.Tilemaps.Tile} The first (or n skipped) tile with the matching index. */ declare function FindByIndex(findIndex: any, skip: number, reverse: boolean, layer: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile | null; //# sourceMappingURL=FindByIndex.d.ts.map