Phaser API Documentation

  Version: 

Member of: Phaser.Utils.Array

<static> SpliceOne(array, index)

Description:

Removes a single item from an array and returns it without creating gc, like the native splice does. Based on code by Mike Reinstein.

Parameters:

name type description
array array

The array to splice from.

index number

The index of the item which should be spliced.

Returns:
Description:

The item which was spliced (removed).

Type:
  • *
Since: 3.0.0