phaser/Phaser/system/LinkedList.js
Richard Davey e74114f384 Docs
2013-08-12 00:52:35 +01:00

30 lines
832 B
JavaScript

/// <reference path="../Game.ts" />
/**
* Phaser - LinkedList
*
* A miniature linked list class. Useful for optimizing time-critical or highly repetitive tasks!
*/
var Phaser;
(function (Phaser) {
var LinkedList = (function () {
/**
* Creates a new link, and sets <code>object</code> and <code>next</code> to <code>null</code>.
*/
function LinkedList() {
this.object = null;
this.next = null;
}
LinkedList.prototype.destroy = /**
* Clean up memory.
*/
function () {
this.object = null;
if(this.next != null) {
this.next.destroy();
}
this.next = null;
};
return LinkedList;
})();
Phaser.LinkedList = LinkedList;
})(Phaser || (Phaser = {}));