Phaser API Documentation

  Version: 
addAt(child, [index])

Description:

Adds the given Game Object, or array of Game Objects, to this Container at the specified position.

Existing Game Objects in the Container are shifted up.

Each Game Object must be unique within the Container.

Parameters:

name type arguments description
child Phaser.GameObjects.GameObject | Array.<Phaser.GameObjects.GameObject>

The Game Object, or array of Game Objects, to add to the Container.

index number <optional>

The position to insert the Game Object/s at.

Returns:
Description:

This Container instance.

Examples:
Since: 3.4.0