Skip to content

Commit efae7f5

Browse files
committed
DynamicTilemapLayer updates that should have been in the last commit
1 parent 355d9ac commit efae7f5

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

v3/src/gameobjects/tilemap/dynamiclayer/DynamicTilemapLayer.js

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,22 @@ var DynamicTilemapLayer = new Class({
9696
return culledTiles;
9797
},
9898

99+
copy: function (srcTileX, srcTileY, width, height, destTileX, destTileY)
100+
{
101+
TilemapComponents.Copy(srcTileX, srcTileY, width, height, destTileX, destTileY, this.layer);
102+
return this;
103+
},
104+
105+
fill: function (index, tileX, tileY, width, height)
106+
{
107+
TilemapComponents.Fill(index, tileX, tileY, width, height, this.layer);
108+
return this;
109+
},
110+
99111
forEachTile: function (callback, context, tileX, tileY, width, height)
100112
{
101-
return TilemapComponents.ForEachTile(callback, context, tileX, tileY, width, height, this.layer);
113+
TilemapComponents.ForEachTile(callback, context, tileX, tileY, width, height, this.layer);
114+
return this;
102115
},
103116

104117
getTileAt: function (tileX, tileY, nonNull)
@@ -114,6 +127,18 @@ var DynamicTilemapLayer = new Class({
114127
hasTileAt: function (tileX, tileY)
115128
{
116129
return TilemapComponents.HasTileAt(tileX, tileY, this.layer);
130+
},
131+
132+
randomize: function (tileX, tileY, width, height, indices)
133+
{
134+
TilemapComponents.Randomize(tileX, tileY, width, height, indices, this.layer);
135+
return this;
136+
},
137+
138+
shuffle: function (tileX, tileY, width, height)
139+
{
140+
TilemapComponents.Shuffle(tileX, tileY, width, height, this.layer);
141+
return this;
117142
}
118143

119144
// forEach: function (callback)

0 commit comments

Comments
 (0)