Phaser API Documentation

  Version: 

Member of: Phaser.Structs.List

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

Description:

Returns all children in this List.

You can optionally specify a matching criteria using the property and value arguments.

For example: getAll('parent') would return only children that have a property called parent.

You can also specify a value to compare the property to:

getAll('visible', true) would return only children that have their visible property set to true.

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

Parameters:

name type arguments description
property string <optional>

An optional property to test against the value argument.

value * <optional>

If property is set then Child.property must strictly equal this value to be included in the results.

startIndex number <optional>

The first child index to start the search from.

endIndex number <optional>

The last child index to search up until.

Returns:
Description:

All items of the List which match the given criterion, if any.

Type:
  • Array.<*>
Examples:
Since: 3.0.0
Source: src/structs/List.js (Line 276)