Skip to content

Commit 302eba1

Browse files
authored
Update WeightedRandomize docs for index arrays
1 parent e128733 commit 302eba1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/gameobjects/tilemap/components/WeightedRandomize.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ var GetTilesWithin = require('./GetTilesWithin');
2020
* @param {integer} [width=max width based on tileX] - [description]
2121
* @param {integer} [height=max height based on tileY] - [description]
2222
* @param {object[]} [weightedIndexes] - An array of objects to randomly draw from during
23-
* randomization. They should be in the form: { index: 0, weight: 4 }.
23+
* randomization. They should be in the form: { index: 0, weight: 4 } or
24+
* { index: [0, 1], weight: 4 } if you wish to draw from multiple tile indexes.
2425
* @param {LayerData} layer - [description]
2526
*/
2627
var WeightedRandomize = function (tileX, tileY, width, height, weightedIndexes, layer)

0 commit comments

Comments
 (0)