Phaser API Documentation

  Version: 

Member of: Phaser.Structs.Set

iterate(callback, [callbackScope])

Description:

Passes each value in this Set to the given callback.

For when you absolutely know this Set won't be modified during the iteration.

The callback must return a boolean. If it returns false then it will abort the Set iteration immediately. If it returns true, it will carry on iterating the next child in the Set.

Parameters:

name type arguments description
callback EachSetCallback

The callback to be invoked and passed each value this Set contains.

callbackScope * <optional>

The scope of the callback.

Returns:
Description:

This Set object.

Since: 3.0.0
Source: src/structs/Set.js (Line 215)