phaser/v3/src/gameobjects/tilemap/components/Fill.js

14 lines
393 B
JavaScript
Raw Normal View History

var GetTilesWithin = require('./GetTilesWithin');
// Fills indices, not other properties. Does not modify collisions. Matches v2 functionality.
var Fill = function (index, tileX, tileY, width, height, layer)
{
var tiles = GetTilesWithin(tileX, tileY, width, height, layer);
for (var i = 0; i < tiles.length; i++)
{
tiles[i].index = index;
}
};
module.exports = Fill;