Skip to content

Commit 0b1e48a

Browse files
committed
Tween.stop can now optionally seek to the strat or end of the tween
1 parent 829f33a commit 0b1e48a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

v3/src/tweens/tween/inc/Stop.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@ var TWEEN_CONST = require('../const');
66
* @method Phaser.Tweens.Tween#stop
77
* @since 3.0.0
88
*/
9-
var Stop = function ()
9+
var Stop = function (resetTo)
1010
{
11+
if (resetTo !== undefined)
12+
{
13+
this.seek(resetTo);
14+
}
15+
1116
this.state = TWEEN_CONST.PENDING_REMOVE;
1217
};
1318

0 commit comments

Comments
 (0)