Skip to content

Commit 840b49b

Browse files
author
Javier Alcantara
committed
Tween hasStarted parameter set to false when tween finishes
1 parent 1c169ef commit 840b49b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/tween/Tween.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,13 @@ Phaser.Tween = function (target, game, manager) {
138138
* Is this Tween frame or time based? A frame based tween will use the physics elapsed timer when updating. This means
139139
* it will retain the same consistent frame rate, regardless of the speed of the device. The duration value given should
140140
* be given in frames.
141-
*
141+
*
142142
* If the Tween uses a time based update (which is the default) then the duration is given in milliseconds.
143143
* In this situation a 2000ms tween will last exactly 2 seconds, regardless of the device and how many visual updates the tween
144144
* has actually been through. For very short tweens you may wish to experiment with a frame based update instead.
145145
*
146146
* The default value is whatever you've set in TweenManager.frameBased.
147-
*
147+
*
148148
* @property {boolean} frameBased
149149
* @default
150150
*/
@@ -357,6 +357,7 @@ Phaser.Tween.prototype = {
357357
if (complete)
358358
{
359359
this.onComplete.dispatch(this.target, this);
360+
this._hasStarted = false;
360361

361362
if (this.chainedTween)
362363
{
@@ -813,6 +814,7 @@ Phaser.Tween.prototype = {
813814
// No more repeats and no more children, so we're done
814815
this.isRunning = false;
815816
this.onComplete.dispatch(this.target, this);
817+
this._hasStarted = false;
816818

817819
if (this.chainedTween)
818820
{

0 commit comments

Comments
 (0)