Phaser API Documentation

createMultiple(quantity, [frame], [visible])


Creates multiple Bobs in one call.

The amount created is controlled by a combination of the quantity argument and the number of frames provided.

If the quantity is set to 10 and you provide 2 frames, then 20 Bobs will be created. 10 with the first frame and 10 with the second.


name type arguments Default description
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?


An array of Bob objects that were created.

Since: 3.0.0