Files
phaser/src/math/LinkedList.js
T
Richard Davey 6235f25184 LL
2013-09-01 22:02:42 +01:00

32 lines
528 B
JavaScript

/**
* Phaser - LinkedList
*
* A miniature linked list class. Useful for optimizing time-critical or highly repetitive tasks!
*/
/**
* Creates a new link, and sets <code>object</code> and <code>next</code> to <code>null</code>.
*/
Phaser.LinkedList = function () {
this.object = null;
this.next = null;
};
Phaser.LinkedList.prototype = {
destroy: function () {
this.object = null;
if (this.next != null)
{
this.next.destroy();
}
this.next = null;
}
};