new LinkedList()
A basic linked list data structure.
- Source:
Members
-
first
-
- Default Value:
- null
- Source:
Properties:
Name Type Description first
object First element in the list.
-
last
-
- Default Value:
- null
- Source:
Properties:
Name Type Description last
object Last element in the list.
-
next
-
- Default Value:
- null
- Source:
Properties:
Name Type Description next
object Next element in the list.
-
prev
-
- Default Value:
- null
- Source:
Properties:
Name Type Description prev
object Previous element in the list.
-
total
-
- Default Value:
- 0
- Source:
Properties:
Name Type Description total
number Number of elements in the list.
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: