phaser - v4.0.0-rc.4
    Preparing search index...
    • Takes an array of objects and returns the first element in the array that has properties which match all of those specified in the compare object. For example, if the compare object was: { scaleX: 0.5, alpha: 1 } then it would return the first item which had the property scaleX set to 0.5 and alpha set to 1.

      To use this with a Group: GetFirst(group.getChildren(), compare, index)

      Type Parameters

      Parameters

      • items: G

        The array of items to be searched by this action.

      • compare: object

        The comparison object. Each property in this object will be checked against the items of the array.

      • Optionalindex: number

        An optional offset to start searching from within the items array. Default 0.

      Returns object | GameObject