Phaser API Documentation

setAll(property, value, [startIndex], [endIndex])


Sets the property to the given value on all Game Objects in this Container.

Optionally you can specify a start and end index. For example if this Container had 100 Game Objects, and you set startIndex to 0 and endIndex to 50, it would return matches from only the first 50 Game Objects.


name type arguments Default description
property string

The property that must exist on the Game Object.

value any

The value to get the property to.

startIndex number <optional> 0

An optional start index to search from.

endIndex number <optional> Container.length

An optional end index to search up to (but not included)


This Container instance.

Since: 3.4.0