Phaser API Documentation

  Version: 

Member of: Phaser.Structs.List

replace(oldChild, newChild)

Description:

Replaces a child of this List with the given newChild. The newChild cannot be a member of this List.

Parameters:

name type description
oldChild *

The child in this List that will be replaced.

newChild *

The child to be inserted into this List.

Returns:
Description:

Returns the oldChild that was replaced within this group.

Type:
  • *
Since: 3.0.0
Source: src/structs/List.js (Line 599)