Phaser API Documentation


Member of: Phaser.Structs.List

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


Returns the first element in a given part of the List which matches a specific criterion.


name type arguments description
property string

The name of the property to test or a falsey value to have no criterion.

value *

The value to test the property against, or undefined to allow any value and only check for existence.

startIndex number <optional>

The position in the List to start the search at.

endIndex number <optional>

The position in the List to optionally stop the search at. It won't be checked.


The first item which matches the given criterion, or null if no such item exists.

  • *
Since: 3.0.0
Source: src/structs/List.js (Line 256)