Phaser.TweenManager = function (game){ this.game = game; this._tweens = [] ; } ; Phaser.TweenManager.prototype = { REVISION: '11dev', getAll: function (){ return _tweens; } , removeAll: function (){ _tweens = [] ; } , add: function (tween){ _tweens.push(tween); } , create: function (object, localReference){ if (typeof localReference === "undefined") { localReference = false ; } if (localReference) { object.tween = new Phaser.Tween(object, this.game); return object.tween; } else { return new Phaser.Tween(object, this.game); } } , remove: function (tween){ var i = _tweens.indexOf(tween); if (i !== -1) { _tweens.splice(i, 1); } } , update: function (){ if (_AN_Read_length("length", _tweens) === 0) return false ; var i = 0, numTweens = _AN_Read_length("length", _tweens); while (i < numTweens){ if (_tweens[i].update(this.game.time.now)) { i++ ; } else { _tweens.splice(i, 1); numTweens-- ; } } return true ; } , pauseAll: function (){ for (var i = _AN_Read_length("length", this._tweens) - 1; i >= 0; i-- ){ this._tweens[i].pause(); } ; } , resumeAll: function (){ for (var i = _AN_Read_length("length", this._tweens) - 1; i >= 0; i-- ){ this._tweens[i].resume(); } ; } } ;