Phaser.UpdateManager = function (state){ this.state = state; this.game = state.game; this.list = [] ; this.running = false ; this.processed = 0; } ; Phaser.UpdateManager.prototype.constructor = Phaser.UpdateManager; Phaser.UpdateManager.prototype = { stop: function (){ if (!this.running) { return ; } this.list.length = 0; } , start: function (){ if (!this.running) { return ; } var len = _AN_Read_length('length', this.list); if (len === 0) { return ; } this.processed = 0; for (var i = 0; i < len; i++ ){ if (this.list[i] && this.list[i]._dirty) { this.processed++ ; this.list[i].update(); } } } , add: function (transform){ this.list.push(transform); } } ;