phaser/Phaser/system/LinkedList.js

31 lines
832 B
JavaScript
Raw Normal View History

2013-08-11 23:52:35 +00:00
/// <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 = {}));