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
game object

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:
Phaser Copyright © 2012-2014 Photon Storm Ltd.
Documentation generated by JSDoc 3.3.0-dev on Mon Feb 24 2014 01:12:27 GMT-0000 (GMT) using the DocStrap template.