mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 05:03:37 +00:00
Fix multiple types on Tilemaps
This commit is contained in:
parent
dca7996179
commit
9375bb0530
16 changed files with 76 additions and 76 deletions
|
@ -222,7 +222,7 @@ var BaseSoundManager = new Class({
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {string} key - Asset key for the sound.
|
* @param {string} key - Asset key for the sound.
|
||||||
* @param {SoundConfig|SoundMarker} [extra] - An optional additional object containing settings to be applied to the sound. It could be either config or marker object.
|
* @param {(SoundConfig|SoundMarker)} [extra] - An optional additional object containing settings to be applied to the sound. It could be either config or marker object.
|
||||||
*
|
*
|
||||||
* @return {boolean} Whether the sound started playing successfully.
|
* @return {boolean} Whether the sound started playing successfully.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -443,7 +443,7 @@ var Tile = new Class({
|
||||||
* @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.
|
* @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.
|
||||||
* @param {object} [output] - [description]
|
* @param {object} [output] - [description]
|
||||||
*
|
*
|
||||||
* @return {Phaser.Geom.Rectangle|object}
|
* @return {(Phaser.Geom.Rectangle|object)}
|
||||||
*/
|
*/
|
||||||
getBounds: function (camera, output)
|
getBounds: function (camera, output)
|
||||||
{
|
{
|
||||||
|
|
|
@ -300,7 +300,7 @@ var Tilemap = new Class({
|
||||||
* @method Phaser.Tilemaps.Tilemap#convertLayerToStatic
|
* @method Phaser.Tilemaps.Tilemap#convertLayerToStatic
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {string|integer|Phaser.Tilemaps.DynamicTilemapLayer} [layer] - The name of the layer from Tiled, the
|
* @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer)} [layer] - The name of the layer from Tiled, the
|
||||||
* index of the layer in the map, or a DynamicTilemapLayer.
|
* index of the layer in the map, or a DynamicTilemapLayer.
|
||||||
*
|
*
|
||||||
* @return {?Phaser.Tilemaps.StaticTilemapLayer} Returns the new layer that was created, or null if it
|
* @return {?Phaser.Tilemaps.StaticTilemapLayer} Returns the new layer that was created, or null if it
|
||||||
|
@ -444,7 +444,7 @@ var Tilemap = new Class({
|
||||||
* @method Phaser.Tilemaps.Tilemap#createDynamicLayer
|
* @method Phaser.Tilemaps.Tilemap#createDynamicLayer
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|string} layerID - The layer array index value, or if a string is given, the
|
* @param {(integer|string)} layerID - The layer array index value, or if a string is given, the
|
||||||
* layer name from Tiled.
|
* layer name from Tiled.
|
||||||
* @param {Phaser.Tilemaps.Tileset} tileset - The tileset the new layer will use.
|
* @param {Phaser.Tilemaps.Tileset} tileset - The tileset the new layer will use.
|
||||||
* @param {number} x - The x position to place the layer in the world. If not specified, it will
|
* @param {number} x - The x position to place the layer in the world. If not specified, it will
|
||||||
|
@ -503,7 +503,7 @@ var Tilemap = new Class({
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {string} name - The name of the object layer (from Tiled) to create Sprites from.
|
* @param {string} name - The name of the object layer (from Tiled) to create Sprites from.
|
||||||
* @param {integer|string} id - Either the id (object), gid (tile object) or name (object or
|
* @param {(integer|string)} id - Either the id (object), gid (tile object) or name (object or
|
||||||
* tile object) from Tiled. Ids are unique in Tiled, but a gid is shared by all tile objects
|
* tile object) from Tiled. Ids are unique in Tiled, but a gid is shared by all tile objects
|
||||||
* with the same graphic. The same name can be used on multiple objects.
|
* with the same graphic. The same name can be used on multiple objects.
|
||||||
* @param {object} spriteConfig - The config object to pass into the Sprite creator (i.e.
|
* @param {object} spriteConfig - The config object to pass into the Sprite creator (i.e.
|
||||||
|
@ -593,8 +593,8 @@ var Tilemap = new Class({
|
||||||
* @method Phaser.Tilemaps.Tilemap#createFromTiles
|
* @method Phaser.Tilemaps.Tilemap#createFromTiles
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|array} indexes - The tile index, or array of indexes, to create Sprites from.
|
* @param {(integer|array)} indexes - The tile index, or array of indexes, to create Sprites from.
|
||||||
* @param {integer|array} replacements - The tile index, or array of indexes, to change a converted
|
* @param {(integer|array)} 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
|
* 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.
|
* one-to-one mapping with the indexes array.
|
||||||
* @param {object} spriteConfig - The config object to pass into the Sprite creator (i.e.
|
* @param {object} spriteConfig - The config object to pass into the Sprite creator (i.e.
|
||||||
|
@ -628,7 +628,7 @@ var Tilemap = new Class({
|
||||||
* @method Phaser.Tilemaps.Tilemap#createStaticLayer
|
* @method Phaser.Tilemaps.Tilemap#createStaticLayer
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|string} layerID - The layer array index value, or if a string is given, the
|
* @param {(integer|string)} layerID - The layer array index value, or if a string is given, the
|
||||||
* layer name from Tiled.
|
* layer name from Tiled.
|
||||||
* @param {Phaser.Tilemaps.Tileset} tileset - The tileset the new layer will use.
|
* @param {Phaser.Tilemaps.Tileset} tileset - The tileset the new layer will use.
|
||||||
* @param {number} x - The x position to place the layer in the world. If not specified, it will
|
* @param {number} x - The x position to place the layer in the world. If not specified, it will
|
||||||
|
@ -735,7 +735,7 @@ var Tilemap = new Class({
|
||||||
* @method Phaser.Tilemaps.Tilemap#filterObjects
|
* @method Phaser.Tilemaps.Tilemap#filterObjects
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {Phaser.Tilemaps.ObjectLayer|string} [objectLayer] - The name of an object layer (from Tiled) or an
|
* @param {(Phaser.Tilemaps.ObjectLayer|string)} [objectLayer] - The name of an object layer (from Tiled) or an
|
||||||
* ObjectLayer instance.
|
* ObjectLayer instance.
|
||||||
* @param {TilemapFilterCallback} callback - The callback. Each object in the given area will be passed to
|
* @param {TilemapFilterCallback} callback - The callback. Each object in the given area will be passed to
|
||||||
* this callback as the first and only parameter.
|
* this callback as the first and only parameter.
|
||||||
|
@ -835,7 +835,7 @@ var Tilemap = new Class({
|
||||||
* @method Phaser.Tilemaps.Tilemap#findObject
|
* @method Phaser.Tilemaps.Tilemap#findObject
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {Phaser.Tilemaps.ObjectLayer|string} [objectLayer] - The name of an object layer (from Tiled) or an
|
* @param {(Phaser.Tilemaps.ObjectLayer|string)} [objectLayer] - The name of an object layer (from Tiled) or an
|
||||||
* ObjectLayer instance.
|
* ObjectLayer instance.
|
||||||
* @param {TilemapFindCallback} callback - The callback. Each object in the given area will be passed to
|
* @param {TilemapFindCallback} callback - The callback. Each object in the given area will be passed to
|
||||||
* this callback as the first and only parameter.
|
* this callback as the first and only parameter.
|
||||||
|
@ -983,7 +983,7 @@ var Tilemap = new Class({
|
||||||
* @method Phaser.Tilemaps.Tilemap#getLayer
|
* @method Phaser.Tilemaps.Tilemap#getLayer
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer} [layer] - The name of the
|
* @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The name of the
|
||||||
* layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a
|
* layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a
|
||||||
* StaticTilemapLayer. If not given will default to the maps current layer index.
|
* StaticTilemapLayer. If not given will default to the maps current layer index.
|
||||||
*
|
*
|
||||||
|
@ -1021,7 +1021,7 @@ var Tilemap = new Class({
|
||||||
* @method Phaser.Tilemaps.Tilemap#getLayerIndex
|
* @method Phaser.Tilemaps.Tilemap#getLayerIndex
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer} [layer] - The name of the
|
* @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The name of the
|
||||||
* layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a
|
* layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a
|
||||||
* StaticTilemapLayer. If not given will default to the map's current layer index.
|
* StaticTilemapLayer. If not given will default to the map's current layer index.
|
||||||
*
|
*
|
||||||
|
@ -1156,7 +1156,7 @@ var Tilemap = new Class({
|
||||||
* @method Phaser.Tilemaps.Tilemap#getTilesWithinShape
|
* @method Phaser.Tilemaps.Tilemap#getTilesWithinShape
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle} shape - A shape in world (pixel) coordinates
|
* @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates
|
||||||
* @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.
|
* @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.
|
||||||
* @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don't have
|
* @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don't have
|
||||||
* -1 for an index.
|
* -1 for an index.
|
||||||
|
@ -1308,7 +1308,7 @@ var Tilemap = new Class({
|
||||||
* @method Phaser.Tilemaps.Tilemap#putTileAt
|
* @method Phaser.Tilemaps.Tilemap#putTileAt
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|Phaser.Tilemaps.Tile} tile - The index of this tile to set or a Tile object.
|
* @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.
|
||||||
* @param {integer} tileX - [description]
|
* @param {integer} tileX - [description]
|
||||||
* @param {integer} tileY - [description]
|
* @param {integer} tileY - [description]
|
||||||
* @param {boolean} [recalculateFaces=true] - [description]
|
* @param {boolean} [recalculateFaces=true] - [description]
|
||||||
|
@ -1339,7 +1339,7 @@ var Tilemap = new Class({
|
||||||
* @method Phaser.Tilemaps.Tilemap#putTileAtWorldXY
|
* @method Phaser.Tilemaps.Tilemap#putTileAtWorldXY
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|Phaser.Tilemaps.Tile} tile - The index of this tile to set or a Tile object.
|
* @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.
|
||||||
* @param {integer} worldX - [description]
|
* @param {integer} worldX - [description]
|
||||||
* @param {integer} worldY - [description]
|
* @param {integer} worldY - [description]
|
||||||
* @param {boolean} [recalculateFaces=true] - [description]
|
* @param {boolean} [recalculateFaces=true] - [description]
|
||||||
|
@ -1372,7 +1372,7 @@ var Tilemap = new Class({
|
||||||
* @method Phaser.Tilemaps.Tilemap#putTilesAt
|
* @method Phaser.Tilemaps.Tilemap#putTilesAt
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer[]|integer[][]|Phaser.Tilemaps.Tile[]|Phaser.Tilemaps.Tile[][]} tile - A row (array) or grid (2D array) of Tiles
|
* @param {(integer[]|integer[][]|Phaser.Tilemaps.Tile[]|Phaser.Tilemaps.Tile[][])} tile - A row (array) or grid (2D array) of Tiles
|
||||||
* or tile indexes to place.
|
* or tile indexes to place.
|
||||||
* @param {integer} tileX - [description]
|
* @param {integer} tileX - [description]
|
||||||
* @param {integer} tileY - [description]
|
* @param {integer} tileY - [description]
|
||||||
|
@ -1523,7 +1523,7 @@ var Tilemap = new Class({
|
||||||
* @method Phaser.Tilemaps.Tilemap#removeTileAt
|
* @method Phaser.Tilemaps.Tilemap#removeTileAt
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|Phaser.Tilemaps.Tile} tile - The index of this tile to set or a Tile object.
|
* @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.
|
||||||
* @param {integer} tileX - [description]
|
* @param {integer} tileX - [description]
|
||||||
* @param {integer} tileY - [description]
|
* @param {integer} tileY - [description]
|
||||||
* @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified
|
* @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified
|
||||||
|
@ -1554,7 +1554,7 @@ var Tilemap = new Class({
|
||||||
* @method Phaser.Tilemaps.Tilemap#removeTileAtWorldXY
|
* @method Phaser.Tilemaps.Tilemap#removeTileAtWorldXY
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|Phaser.Tilemaps.Tile} tile - The index of this tile to set or a Tile object.
|
* @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.
|
||||||
* @param {number} worldX - [description]
|
* @param {number} worldX - [description]
|
||||||
* @param {number} worldY - [description]
|
* @param {number} worldY - [description]
|
||||||
* @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified
|
* @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified
|
||||||
|
@ -1655,7 +1655,7 @@ var Tilemap = new Class({
|
||||||
* @method Phaser.Tilemaps.Tilemap#setCollision
|
* @method Phaser.Tilemaps.Tilemap#setCollision
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|array} indexes - Either a single tile index, or an array of tile indexes.
|
* @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes.
|
||||||
* @param {boolean} [collides=true] - If true it will enable collision. If false it will clear
|
* @param {boolean} [collides=true] - If true it will enable collision. If false it will clear
|
||||||
* collision.
|
* collision.
|
||||||
* @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the
|
* @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the
|
||||||
|
@ -1813,7 +1813,7 @@ var Tilemap = new Class({
|
||||||
* @method Phaser.Tilemaps.Tilemap#setTileIndexCallback
|
* @method Phaser.Tilemaps.Tilemap#setTileIndexCallback
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|array} indexes - Either a single tile index, or an array of tile indexes to have a
|
* @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes to have a
|
||||||
* collision callback set for.
|
* collision callback set for.
|
||||||
* @param {function} callback - The callback that will be invoked when the tile is collided with.
|
* @param {function} callback - The callback that will be invoked when the tile is collided with.
|
||||||
* @param {object} callbackContext - The context under which the callback is called.
|
* @param {object} callbackContext - The context under which the callback is called.
|
||||||
|
@ -1869,7 +1869,7 @@ var Tilemap = new Class({
|
||||||
* @method Phaser.Tilemaps.Tilemap#setLayer
|
* @method Phaser.Tilemaps.Tilemap#setLayer
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer} [layer] - The name of the
|
* @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The name of the
|
||||||
* layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a
|
* layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a
|
||||||
* StaticTilemapLayer. If not given will default to the map's current layer index.
|
* StaticTilemapLayer. If not given will default to the map's current layer index.
|
||||||
*
|
*
|
||||||
|
@ -1943,7 +1943,7 @@ var Tilemap = new Class({
|
||||||
*
|
*
|
||||||
* @param {integer} tileWidth - The width of the tiles (in pixels) in the layer.
|
* @param {integer} tileWidth - The width of the tiles (in pixels) in the layer.
|
||||||
* @param {integer} tileHeight - The height of the tiles (in pixels) in the layer.
|
* @param {integer} tileHeight - The height of the tiles (in pixels) in the layer.
|
||||||
* @param {string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer} [layer] - The name of the
|
* @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The name of the
|
||||||
* layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a
|
* layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a
|
||||||
* StaticTilemapLayer. If not given will default to the map's current layer index.
|
* StaticTilemapLayer. If not given will default to the map's current layer index.
|
||||||
*
|
*
|
||||||
|
|
|
@ -18,8 +18,8 @@ var ReplaceByIndex = require('./ReplaceByIndex');
|
||||||
* @function Phaser.Tilemaps.Components.CreateFromTiles
|
* @function Phaser.Tilemaps.Components.CreateFromTiles
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|array} indexes - The tile index, or array of indexes, to create Sprites from.
|
* @param {(integer|array)} indexes - The tile index, or array of indexes, to create Sprites from.
|
||||||
* @param {integer|array} replacements - The tile index, or array of indexes, to change a converted
|
* @param {(integer|array)} 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
|
* 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.
|
* one-to-one mapping with the indexes array.
|
||||||
* @param {object} spriteConfig - The config object to pass into the Sprite creator (i.e.
|
* @param {object} spriteConfig - The config object to pass into the Sprite creator (i.e.
|
||||||
|
|
|
@ -28,7 +28,7 @@ var TriangleToRectangle = function (triangle, rect)
|
||||||
* @function Phaser.Tilemaps.Components.GetTilesWithinShape
|
* @function Phaser.Tilemaps.Components.GetTilesWithinShape
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle} shape - A shape in world (pixel) coordinates
|
* @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates
|
||||||
* @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.
|
* @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.
|
||||||
* @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don't have
|
* @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don't have
|
||||||
* -1 for an index.
|
* -1 for an index.
|
||||||
|
|
|
@ -18,7 +18,7 @@ var SetTileCollision = require('./SetTileCollision');
|
||||||
* @function Phaser.Tilemaps.Components.PutTileAt
|
* @function Phaser.Tilemaps.Components.PutTileAt
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|Phaser.Tilemaps.Tile} tile - The index of this tile to set or a Tile object.
|
* @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.
|
||||||
* @param {integer} tileX - [description]
|
* @param {integer} tileX - [description]
|
||||||
* @param {integer} tileY - [description]
|
* @param {integer} tileY - [description]
|
||||||
* @param {boolean} [recalculateFaces=true] - [description]
|
* @param {boolean} [recalculateFaces=true] - [description]
|
||||||
|
|
|
@ -17,7 +17,7 @@ var WorldToTileY = require('./WorldToTileY');
|
||||||
* @function Phaser.Tilemaps.Components.PutTileAtWorldXY
|
* @function Phaser.Tilemaps.Components.PutTileAtWorldXY
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|Phaser.Tilemaps.Tile} tile - The index of this tile to set or a Tile object.
|
* @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.
|
||||||
* @param {integer} worldX - [description]
|
* @param {integer} worldX - [description]
|
||||||
* @param {integer} worldY - [description]
|
* @param {integer} worldY - [description]
|
||||||
* @param {boolean} [recalculateFaces=true] - [description]
|
* @param {boolean} [recalculateFaces=true] - [description]
|
||||||
|
|
|
@ -17,7 +17,7 @@ var PutTileAt = require('./PutTileAt');
|
||||||
* @function Phaser.Tilemaps.Components.PutTilesAt
|
* @function Phaser.Tilemaps.Components.PutTilesAt
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer[]|integer[][]|Phaser.Tilemaps.Tile[]|Phaser.Tilemaps.Tile[][]} tile - A row (array) or grid (2D array) of Tiles
|
* @param {(integer[]|integer[][]|Phaser.Tilemaps.Tile[]|Phaser.Tilemaps.Tile[][])} tile - A row (array) or grid (2D array) of Tiles
|
||||||
* or tile indexes to place.
|
* or tile indexes to place.
|
||||||
* @param {integer} tileX - [description]
|
* @param {integer} tileX - [description]
|
||||||
* @param {integer} tileY - [description]
|
* @param {integer} tileY - [description]
|
||||||
|
|
|
@ -15,7 +15,7 @@ var CalculateFacesAt = require('./CalculateFacesAt');
|
||||||
* @function Phaser.Tilemaps.Components.RemoveTileAt
|
* @function Phaser.Tilemaps.Components.RemoveTileAt
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|Phaser.Tilemaps.Tile} tile - The index of this tile to set or a Tile object.
|
* @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.
|
||||||
* @param {integer} tileX - [description]
|
* @param {integer} tileX - [description]
|
||||||
* @param {integer} tileY - [description]
|
* @param {integer} tileY - [description]
|
||||||
* @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified
|
* @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified
|
||||||
|
|
|
@ -15,7 +15,7 @@ var WorldToTileY = require('./WorldToTileY');
|
||||||
* @function Phaser.Tilemaps.Components.RemoveTileAtWorldXY
|
* @function Phaser.Tilemaps.Components.RemoveTileAtWorldXY
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|Phaser.Tilemaps.Tile} tile - The index of this tile to set or a Tile object.
|
* @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.
|
||||||
* @param {number} worldX - [description]
|
* @param {number} worldX - [description]
|
||||||
* @param {number} worldY - [description]
|
* @param {number} worldY - [description]
|
||||||
* @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified
|
* @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified
|
||||||
|
|
|
@ -16,7 +16,7 @@ var SetLayerCollisionIndex = require('./SetLayerCollisionIndex');
|
||||||
* @function Phaser.Tilemaps.Components.SetCollision
|
* @function Phaser.Tilemaps.Components.SetCollision
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|array} indexes - Either a single tile index, or an array of tile indexes.
|
* @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes.
|
||||||
* @param {boolean} [collides=true] - If true it will enable collision. If false it will clear
|
* @param {boolean} [collides=true] - If true it will enable collision. If false it will clear
|
||||||
* collision.
|
* collision.
|
||||||
* @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the
|
* @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
* @function Phaser.Tilemaps.Components.SetTileIndexCallback
|
* @function Phaser.Tilemaps.Components.SetTileIndexCallback
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|array} indexes - Either a single tile index, or an array of tile indexes to have a
|
* @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes to have a
|
||||||
* collision callback set for.
|
* collision callback set for.
|
||||||
* @param {function} callback - The callback that will be invoked when the tile is collided with.
|
* @param {function} callback - The callback that will be invoked when the tile is collided with.
|
||||||
* @param {object} callbackContext - The context under which the callback is called.
|
* @param {object} callbackContext - The context under which the callback is called.
|
||||||
|
|
|
@ -190,8 +190,8 @@ var DynamicTilemapLayer = new Class({
|
||||||
* @method Phaser.Tilemaps.DynamicTilemapLayer#createFromTiles
|
* @method Phaser.Tilemaps.DynamicTilemapLayer#createFromTiles
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|array} indexes - The tile index, or array of indexes, to create Sprites from.
|
* @param {(integer|array)} indexes - The tile index, or array of indexes, to create Sprites from.
|
||||||
* @param {integer|array} replacements - The tile index, or array of indexes, to change a converted
|
* @param {(integer|array)} 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
|
* 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.
|
* one-to-one mapping with the indexes array.
|
||||||
* @param {object} spriteConfig - The config object to pass into the Sprite creator (i.e.
|
* @param {object} spriteConfig - The config object to pass into the Sprite creator (i.e.
|
||||||
|
@ -478,7 +478,7 @@ var DynamicTilemapLayer = new Class({
|
||||||
* @method Phaser.Tilemaps.DynamicTilemapLayer#getTilesWithinShape
|
* @method Phaser.Tilemaps.DynamicTilemapLayer#getTilesWithinShape
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle} shape - A shape in world (pixel) coordinates
|
* @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates
|
||||||
* @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.
|
* @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.
|
||||||
* @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don't have
|
* @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don't have
|
||||||
* -1 for an index.
|
* -1 for an index.
|
||||||
|
@ -565,7 +565,7 @@ var DynamicTilemapLayer = new Class({
|
||||||
* @method Phaser.Tilemaps.DynamicTilemapLayer#putTileAt
|
* @method Phaser.Tilemaps.DynamicTilemapLayer#putTileAt
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|Phaser.Tilemaps.Tile} tile - The index of this tile to set or a Tile object.
|
* @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.
|
||||||
* @param {integer} tileX - [description]
|
* @param {integer} tileX - [description]
|
||||||
* @param {integer} tileY - [description]
|
* @param {integer} tileY - [description]
|
||||||
* @param {boolean} [recalculateFaces=true] - [description]
|
* @param {boolean} [recalculateFaces=true] - [description]
|
||||||
|
@ -586,7 +586,7 @@ var DynamicTilemapLayer = new Class({
|
||||||
* @method Phaser.Tilemaps.DynamicTilemapLayer#putTileAtWorldXY
|
* @method Phaser.Tilemaps.DynamicTilemapLayer#putTileAtWorldXY
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|Phaser.Tilemaps.Tile} tile - The index of this tile to set or a Tile object.
|
* @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.
|
||||||
* @param {integer} worldX - [description]
|
* @param {integer} worldX - [description]
|
||||||
* @param {integer} worldY - [description]
|
* @param {integer} worldY - [description]
|
||||||
* @param {boolean} [recalculateFaces=true] - [description]
|
* @param {boolean} [recalculateFaces=true] - [description]
|
||||||
|
@ -609,7 +609,7 @@ var DynamicTilemapLayer = new Class({
|
||||||
* @method Phaser.Tilemaps.DynamicTilemapLayer#putTilesAt
|
* @method Phaser.Tilemaps.DynamicTilemapLayer#putTilesAt
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer[]|integer[][]|Phaser.Tilemaps.Tile[]|Phaser.Tilemaps.Tile[][]} tile - A row (array) or grid (2D array) of Tiles
|
* @param {(integer[]|integer[][]|Phaser.Tilemaps.Tile[]|Phaser.Tilemaps.Tile[][])} tile - A row (array) or grid (2D array) of Tiles
|
||||||
* or tile indexes to place.
|
* or tile indexes to place.
|
||||||
* @param {integer} tileX - [description]
|
* @param {integer} tileX - [description]
|
||||||
* @param {integer} tileY - [description]
|
* @param {integer} tileY - [description]
|
||||||
|
@ -656,7 +656,7 @@ var DynamicTilemapLayer = new Class({
|
||||||
* @method Phaser.Tilemaps.DynamicTilemapLayer#removeTileAt
|
* @method Phaser.Tilemaps.DynamicTilemapLayer#removeTileAt
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|Phaser.Tilemaps.Tile} tile - The index of this tile to set or a Tile object.
|
* @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.
|
||||||
* @param {integer} tileX - [description]
|
* @param {integer} tileX - [description]
|
||||||
* @param {integer} tileY - [description]
|
* @param {integer} tileY - [description]
|
||||||
* @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified
|
* @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified
|
||||||
|
@ -677,7 +677,7 @@ var DynamicTilemapLayer = new Class({
|
||||||
* @method Phaser.Tilemaps.DynamicTilemapLayer#removeTileAtWorldXY
|
* @method Phaser.Tilemaps.DynamicTilemapLayer#removeTileAtWorldXY
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|Phaser.Tilemaps.Tile} tile - The index of this tile to set or a Tile object.
|
* @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.
|
||||||
* @param {number} worldX - [description]
|
* @param {number} worldX - [description]
|
||||||
* @param {number} worldY - [description]
|
* @param {number} worldY - [description]
|
||||||
* @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified
|
* @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified
|
||||||
|
@ -751,7 +751,7 @@ var DynamicTilemapLayer = new Class({
|
||||||
* @method Phaser.Tilemaps.DynamicTilemapLayer#setCollision
|
* @method Phaser.Tilemaps.DynamicTilemapLayer#setCollision
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|array} indexes - Either a single tile index, or an array of tile indexes.
|
* @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes.
|
||||||
* @param {boolean} [collides=true] - If true it will enable collision. If false it will clear
|
* @param {boolean} [collides=true] - If true it will enable collision. If false it will clear
|
||||||
* collision.
|
* collision.
|
||||||
* @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the
|
* @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the
|
||||||
|
@ -874,7 +874,7 @@ var DynamicTilemapLayer = new Class({
|
||||||
* @method Phaser.Tilemaps.DynamicTilemapLayer#setTileIndexCallback
|
* @method Phaser.Tilemaps.DynamicTilemapLayer#setTileIndexCallback
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|array} indexes - Either a single tile index, or an array of tile indexes to have a
|
* @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes to have a
|
||||||
* collision callback set for.
|
* collision callback set for.
|
||||||
* @param {function} callback - The callback that will be invoked when the tile is collided with.
|
* @param {function} callback - The callback that will be invoked when the tile is collided with.
|
||||||
* @param {object} callbackContext - The context under which the callback is called.
|
* @param {object} callbackContext - The context under which the callback is called.
|
||||||
|
|
|
@ -203,7 +203,7 @@ var LayerData = new Class({
|
||||||
* [description]
|
* [description]
|
||||||
*
|
*
|
||||||
* @name Phaser.Tilemaps.LayerData#tilemapLayer
|
* @name Phaser.Tilemaps.LayerData#tilemapLayer
|
||||||
* @type {Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer}
|
* @type {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)}
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*/
|
*/
|
||||||
this.tilemapLayer = GetFastValue(config, 'tilemapLayer', null);
|
this.tilemapLayer = GetFastValue(config, 'tilemapLayer', null);
|
||||||
|
|
|
@ -21,7 +21,7 @@ var ParseWeltmeister = require('./impact/ParseWeltmeister');
|
||||||
*
|
*
|
||||||
* @param {string} name - The name of the tilemap, used to set the name on the MapData.
|
* @param {string} name - The name of the tilemap, used to set the name on the MapData.
|
||||||
* @param {integer} mapFormat - See ../Formats.js.
|
* @param {integer} mapFormat - See ../Formats.js.
|
||||||
* @param {integer[][]|string|object} data - 2D array, CSV string or Tiled JSON object.
|
* @param {(integer[][]|string|object)} data - 2D array, CSV string or Tiled JSON object.
|
||||||
* @param {integer} tileWidth - The width of a tile in pixels. Required for 2D array and CSV, but
|
* @param {integer} tileWidth - The width of a tile in pixels. Required for 2D array and CSV, but
|
||||||
* ignored for Tiled JSON.
|
* ignored for Tiled JSON.
|
||||||
* @param {integer} tileHeight - The height of a tile in pixels. Required for 2D array and CSV, but
|
* @param {integer} tileHeight - The height of a tile in pixels. Required for 2D array and CSV, but
|
||||||
|
|
|
@ -142,7 +142,7 @@ var StaticTilemapLayer = new Class({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Phaser.Tilemaps.StaticTilemapLayer#renderer
|
* @name Phaser.Tilemaps.StaticTilemapLayer#renderer
|
||||||
* @type {Phaser.Renderer.CanvasRenderer|Phaser.Renderer.WebGLRenderer}
|
* @type {(Phaser.Renderer.CanvasRenderer|Phaser.Renderer.WebGLRenderer)}
|
||||||
* @private
|
* @private
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*/
|
*/
|
||||||
|
@ -393,8 +393,8 @@ var StaticTilemapLayer = new Class({
|
||||||
* @method Phaser.Tilemaps.StaticTilemapLayer#createFromTiles
|
* @method Phaser.Tilemaps.StaticTilemapLayer#createFromTiles
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|array} indexes - The tile index, or array of indexes, to create Sprites from.
|
* @param {(integer|array)} indexes - The tile index, or array of indexes, to create Sprites from.
|
||||||
* @param {integer|array} replacements - The tile index, or array of indexes, to change a converted
|
* @param {(integer|array)} 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
|
* 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.
|
* one-to-one mapping with the indexes array.
|
||||||
* @param {object} spriteConfig - The config object to pass into the Sprite creator (i.e.
|
* @param {object} spriteConfig - The config object to pass into the Sprite creator (i.e.
|
||||||
|
@ -656,7 +656,7 @@ var StaticTilemapLayer = new Class({
|
||||||
* @method Phaser.Tilemaps.StaticTilemapLayer#getTilesWithinShape
|
* @method Phaser.Tilemaps.StaticTilemapLayer#getTilesWithinShape
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle} shape - A shape in world (pixel) coordinates
|
* @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates
|
||||||
* @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.
|
* @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.
|
||||||
* @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don't have
|
* @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don't have
|
||||||
* -1 for an index.
|
* -1 for an index.
|
||||||
|
@ -743,7 +743,7 @@ var StaticTilemapLayer = new Class({
|
||||||
* @method Phaser.Tilemaps.StaticTilemapLayer#setCollision
|
* @method Phaser.Tilemaps.StaticTilemapLayer#setCollision
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|array} indexes - Either a single tile index, or an array of tile indexes.
|
* @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes.
|
||||||
* @param {boolean} [collides=true] - If true it will enable collision. If false it will clear
|
* @param {boolean} [collides=true] - If true it will enable collision. If false it will clear
|
||||||
* collision.
|
* collision.
|
||||||
* @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the
|
* @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the
|
||||||
|
@ -843,7 +843,7 @@ var StaticTilemapLayer = new Class({
|
||||||
* @method Phaser.Tilemaps.StaticTilemapLayer#setTileIndexCallback
|
* @method Phaser.Tilemaps.StaticTilemapLayer#setTileIndexCallback
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {integer|array} indexes - Either a single tile index, or an array of tile indexes to have a
|
* @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes to have a
|
||||||
* collision callback set for.
|
* collision callback set for.
|
||||||
* @param {function} callback - The callback that will be invoked when the tile is collided with.
|
* @param {function} callback - The callback that will be invoked when the tile is collided with.
|
||||||
* @param {object} callbackContext - The context under which the callback is called.
|
* @param {object} callbackContext - The context under which the callback is called.
|
||||||
|
|
Loading…
Reference in a new issue