diff --git a/v3/src/gameobjects/tilemap/Tilemap.js b/v3/src/gameobjects/tilemap/Tilemap.js index 4ae285959..638c747a5 100644 --- a/v3/src/gameobjects/tilemap/Tilemap.js +++ b/v3/src/gameobjects/tilemap/Tilemap.js @@ -334,20 +334,20 @@ var Tilemap = new Class({ } }, - putTile: function (tile, tileX, tileY, layer) + putTileAt: function (tile, tileX, tileY, layer) { layer = this.getLayer(layer); - if (this._isStaticCall(layer, 'putTile')) { return null; } + if (this._isStaticCall(layer, 'putTileAt')) { return null; } if (layer === null) { return null; } - return TilemapComponents.PutTile(tile, tileX, tileY, layer); + return TilemapComponents.PutTileAt(tile, tileX, tileY, layer); }, - putTileWorldXY: function (tile, worldX, worldY, camera, layer) + putTileAtWorldXY: function (tile, worldX, worldY, camera, layer) { layer = this.getLayer(layer); - if (this._isStaticCall(layer, 'putTileWorldXY')) { return null; } + if (this._isStaticCall(layer, 'putTileAtWorldXY')) { return null; } if (layer === null) { return null; } - return TilemapComponents.PutTileWorldXY(tile, worldX, worldY, camera, layer); + return TilemapComponents.PutTileAtWorldXY(tile, worldX, worldY, camera, layer); }, randomize: function (tileX, tileY, width, height, indices, layer) @@ -368,20 +368,20 @@ var Tilemap = new Class({ return this; }, - removeTile: function (tileX, tileY, replaceWithNull, layer) + removeTileAt: function (tileX, tileY, replaceWithNull, layer) { layer = this.getLayer(layer); - if (this._isStaticCall(layer, 'removeTile')) { return null; } + if (this._isStaticCall(layer, 'removeTileAt')) { return null; } if (layer === null) { return null; } - return TilemapComponents.RemoveTile(tileX, tileY, replaceWithNull, layer); + return TilemapComponents.RemoveTileAt(tileX, tileY, replaceWithNull, layer); }, - removeTileWorldXY: function (worldX, worldY, replaceWithNull, camera, layer) + removeTileAtWorldXY: function (worldX, worldY, replaceWithNull, camera, layer) { layer = this.getLayer(layer); - if (this._isStaticCall(layer, 'removeTileWorldXY')) { return null; } + if (this._isStaticCall(layer, 'removeTileAtWorldXY')) { return null; } if (layer === null) { return null; } - return TilemapComponents.RemoveTileWorldXY(worldX, worldY, replaceWithNull, camera, layer); + return TilemapComponents.RemoveTileAtWorldXY(worldX, worldY, replaceWithNull, camera, layer); }, replaceByIndex: function (findIndex, newIndex, tileX, tileY, width, height, layer) diff --git a/v3/src/gameobjects/tilemap/components/PutTile.js b/v3/src/gameobjects/tilemap/components/PutTileAt.js similarity index 100% rename from v3/src/gameobjects/tilemap/components/PutTile.js rename to v3/src/gameobjects/tilemap/components/PutTileAt.js diff --git a/v3/src/gameobjects/tilemap/components/PutTileWorldXY.js b/v3/src/gameobjects/tilemap/components/PutTileAtWorldXY.js similarity index 51% rename from v3/src/gameobjects/tilemap/components/PutTileWorldXY.js rename to v3/src/gameobjects/tilemap/components/PutTileAtWorldXY.js index 32b6885bf..4d116d20e 100644 --- a/v3/src/gameobjects/tilemap/components/PutTileWorldXY.js +++ b/v3/src/gameobjects/tilemap/components/PutTileAtWorldXY.js @@ -1,12 +1,12 @@ -var PutTile = require('./PutTile'); +var PutTileAt = require('./PutTileAt'); var WorldToTileX = require('./WorldToTileX'); var WorldToTileY = require('./WorldToTileY'); -var PutTileWorldXY = function (tile, worldX, worldY, camera, layer) +var PutTileAtWorldXY = function (tile, worldX, worldY, camera, layer) { var tileX = WorldToTileX(worldX, camera, layer); var tileY = WorldToTileY(worldY, camera, layer); - return PutTile(tile, tileX, tileY, layer); + return PutTileAt(tile, tileX, tileY, layer); }; -module.exports = PutTileWorldXY; +module.exports = PutTileAtWorldXY; diff --git a/v3/src/gameobjects/tilemap/components/RemoveTile.js b/v3/src/gameobjects/tilemap/components/RemoveTileAt.js similarity index 100% rename from v3/src/gameobjects/tilemap/components/RemoveTile.js rename to v3/src/gameobjects/tilemap/components/RemoveTileAt.js diff --git a/v3/src/gameobjects/tilemap/components/RemoveTileAtWorldXY.js b/v3/src/gameobjects/tilemap/components/RemoveTileAtWorldXY.js new file mode 100644 index 000000000..69b8aa85b --- /dev/null +++ b/v3/src/gameobjects/tilemap/components/RemoveTileAtWorldXY.js @@ -0,0 +1,12 @@ +var RemoveTileAt = require('./RemoveTileAt'); +var WorldToTileX = require('./WorldToTileX'); +var WorldToTileY = require('./WorldToTileY'); + +var RemoveTileAtWorldXY = function (worldX, worldY, replaceWithNull, camera, layer) +{ + var tileX = WorldToTileX(worldX, camera, layer); + var tileY = WorldToTileY(worldY, camera, layer); + return RemoveTileAt(tileX, tileY, replaceWithNull, layer); +}; + +module.exports = RemoveTileAtWorldXY; diff --git a/v3/src/gameobjects/tilemap/components/RemoveTileWorldXY.js b/v3/src/gameobjects/tilemap/components/RemoveTileWorldXY.js deleted file mode 100644 index 5fa733a45..000000000 --- a/v3/src/gameobjects/tilemap/components/RemoveTileWorldXY.js +++ /dev/null @@ -1,12 +0,0 @@ -var RemoveTile = require('./RemoveTile'); -var WorldToTileX = require('./WorldToTileX'); -var WorldToTileY = require('./WorldToTileY'); - -var RemoveTileWorldXY = function (worldX, worldY, replaceWithNull, camera, layer) -{ - var tileX = WorldToTileX(worldX, camera, layer); - var tileY = WorldToTileY(worldY, camera, layer); - return RemoveTile(tileX, tileY, replaceWithNull, layer); -}; - -module.exports = RemoveTileWorldXY; diff --git a/v3/src/gameobjects/tilemap/components/index.js b/v3/src/gameobjects/tilemap/components/index.js index 3e5c4f9d3..1c601ca3e 100644 --- a/v3/src/gameobjects/tilemap/components/index.js +++ b/v3/src/gameobjects/tilemap/components/index.js @@ -11,11 +11,11 @@ module.exports = { HasTileAt: require('./HasTileAt'), HasTileAtWorldXY: require('./HasTileAtWorldXY'), IsInLayerBounds: require('./IsInLayerBounds'), - PutTile: require('./PutTile'), - PutTileWorldXY: require('./PutTileWorldXY'), + PutTileAt: require('./PutTileAt'), + PutTileAtWorldXY: require('./PutTileAtWorldXY'), Randomize: require('./Randomize'), - RemoveTile: require('./RemoveTile'), - RemoveTileWorldXY: require('./RemoveTileWorldXY'), + RemoveTileAt: require('./RemoveTileAt'), + RemoveTileAtWorldXY: require('./RemoveTileAtWorldXY'), ReplaceByIndex: require('./ReplaceByIndex'), Shuffle: require('./Shuffle'), SwapByIndex: require('./SwapByIndex'), diff --git a/v3/src/gameobjects/tilemap/dynamiclayer/DynamicTilemapLayer.js b/v3/src/gameobjects/tilemap/dynamiclayer/DynamicTilemapLayer.js index 0d6265914..ae74df984 100644 --- a/v3/src/gameobjects/tilemap/dynamiclayer/DynamicTilemapLayer.js +++ b/v3/src/gameobjects/tilemap/dynamiclayer/DynamicTilemapLayer.js @@ -112,14 +112,14 @@ var DynamicTilemapLayer = new Class({ return TilemapComponents.HasTileAtWorldXY(worldX, worldY, camera, this.layer); }, - putTile: function (tile, tileX, tileY) + putTileAt: function (tile, tileX, tileY) { - return TilemapComponents.PutTile(tile, tileX, tileY, this.layer); + return TilemapComponents.PutTileAt(tile, tileX, tileY, this.layer); }, - putTileWorldXY: function (tile, worldX, worldY, camera) + putTileAtWorldXY: function (tile, worldX, worldY, camera) { - return TilemapComponents.PutTileWorldXY(tile, worldX, worldY, camera, this.layer); + return TilemapComponents.PutTileAtWorldXY(tile, worldX, worldY, camera, this.layer); }, randomize: function (tileX, tileY, width, height, indices) @@ -128,14 +128,14 @@ var DynamicTilemapLayer = new Class({ return this; }, - removeTile: function (tileX, tileY, replaceWithNull) + removeTileAt: function (tileX, tileY, replaceWithNull) { - return TilemapComponents.RemoveTile(tileX, tileY, replaceWithNull, this.layer); + return TilemapComponents.RemoveTileAt(tileX, tileY, replaceWithNull, this.layer); }, - removeTileWorldXY: function (worldX, worldY, replaceWithNull, camera) + removeTileAtWorldXY: function (worldX, worldY, replaceWithNull, camera) { - return TilemapComponents.RemoveTileWorldXY(worldX, worldY, replaceWithNull, camera, this.layer); + return TilemapComponents.RemoveTileAtWorldXY(worldX, worldY, replaceWithNull, camera, this.layer); }, replaceByIndex: function (findIndex, newIndex, tileX, tileY, width, height)