Phaser API Documentation

  Version: 
getIndex(child)

Description:

Returns the index of the given Game Object in this Container.

Parameters:

name type description
child Phaser.GameObjects.GameObject

The Game Object to search for in this Container.

Returns:
Description:

The index of the Game Object in this Container, or -1 if not found.

Type:
  • number
Since: 3.4.0