Phaser API Documentation

  Version: 
iterate(callback, [context], [args])

Description:

Passes all Game Objects in this Container to the given callback.

Only use this method when you absolutely know that the Container will not be modified during the iteration, i.e. by removing or adding to its contents.

Parameters:

name type arguments description
callback function

The function to call.

context object <optional>

Value to use as this when executing callback.

args * <optional>

Additional arguments that will be passed to the callback, after the child.

Returns:
Description:

This Container instance.

Since: 3.4.0