Phaser API Documentation

  Version: 
createFromCallback(callback, quantity, [frame], [visible])

Description:

Creates multiple Bob objects within this Blitter and then passes each of them to the specified callback.

Parameters:

name type arguments Default description
callback CreateCallback

The callback to invoke after creating a bob. It will be sent two arguments: The Bob and the index of the Bob.

quantity number

The quantity of Bob objects to create.

frame string | number | Array.<string> | Array.<number> | Phaser.Textures.Frame | Array.<Phaser.Textures.Frame> <optional>

The Frame the Bobs will use. It must be part of the Blitter Texture.

visible boolean <optional> true

Should the created Bob render or not?

Returns:
Description:

An array of Bob objects that were created.

Type:
Since: 3.0.0