Class: LinkedList

Phaser. LinkedList

Phaser.LinkedList

new LinkedList()

A basic linked list data structure.

Source:

Members

first

Properties:
Name Type Description
first object

First element in the list.

Default Value:
  • null
Source:

last

Properties:
Name Type Description
last object

Last element in the list.

Default Value:
  • null
Source:

next

Properties:
Name Type Description
next object

Next element in the list.

Default Value:
  • null
Source:

prev

Properties:
Name Type Description
prev object

Previous element in the list.

Default Value:
  • null
Source:

total

Properties:
Name Type Description
total number

Number of elements in the list.

Default Value:
  • 0
Source:

Methods

add(child) → {object}

Adds a new element to this linked list.

Parameters:
Name Type Description
child object

The element to add to this list. Can be a Phaser.Sprite or any other object you need to quickly iterate through.

Source:
Returns:

The child that was added.

Type
object

callAll(callback)

Calls a function on all members of this list, using the member as the context for the callback. The function must exist on the member.

Parameters:
Name Type Description
callback function

The function to call.

Source:

remove(child)

Removes the given element from this linked list if it exists.

Parameters:
Name Type Description
child object

The child to be removed from the list.

Source:

reset()

Resets the first, last, next and previous node pointers in this list.

Source:
Phaser Copyright © 2012-2014 Photon Storm Ltd.
Documentation generated by JSDoc 3.3.0-dev on Tue May 20 2014 10:05:59 GMT+0100 (BST) using the DocStrap template.