Phaser API Documentation

removeBetween([startIndex], [endIndex], [destroyChild])


Removes the Game Objects between the given positions in this Container.

You can also optionally call destroy on each Game Object that is removed from the Container.


name type arguments Default description
startIndex number <optional> 0

An optional start index to search from.

endIndex number <optional> Container.length

An optional end index to search up to (but not included)

destroyChild boolean <optional> false

Optionally call destroy on each Game Object successfully removed from this Container.


This Container instance.

Since: 3.4.0