mirror of
https://github.com/wassname/phaser.git
synced 2026-07-19 11:26:26 +08:00
* Fixed small bug stopping Tween.pause / resume from resuming correctly when called directly.
* Fixed an issue where Tweens.removeAll wasn't clearing tweens in the addition queue. * Change: When you swap State all active tweens are now purged.
This commit is contained in:
+5
-1
@@ -246,11 +246,15 @@ Phaser.Tween.prototype = {
|
||||
|
||||
pause: function () {
|
||||
this._paused = true;
|
||||
this._pausedTime = this.game.time.now;
|
||||
},
|
||||
|
||||
resume: function () {
|
||||
|
||||
this._paused = false;
|
||||
this._startTime += this.game.time.pauseDuration;
|
||||
|
||||
this._startTime += (this.game.time.now - this._pausedTime);
|
||||
|
||||
},
|
||||
|
||||
update: function ( time ) {
|
||||
|
||||
@@ -39,7 +39,8 @@ Phaser.TweenManager.prototype = {
|
||||
*/
|
||||
removeAll: function () {
|
||||
|
||||
this._tweens = [];
|
||||
this._add.length = 0;
|
||||
this._tweens.length = 0;
|
||||
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user