Skip to content

Commit 9ea3eb1

Browse files
committed
Added getValue method back and updated it
1 parent 834a582 commit 9ea3eb1

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

src/tweens/tween/Tween.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,23 @@ var Tween = new Class({
344344
this.callbackScope;
345345
},
346346

347+
/**
348+
* Returns the current value of the specified Tween Data.
349+
*
350+
* @method Phaser.Tweens.Tween#getValue
351+
* @since 3.0.0
352+
*
353+
* @param {integer} [index=0] - The Tween Data to return the value from.
354+
*
355+
* @return {number} The value of the requested Tween Data.
356+
*/
357+
getValue: function (index)
358+
{
359+
if (index === undefined) { index = 0; }
360+
361+
return this.data[index].current;
362+
},
363+
347364
/**
348365
* Set the scale the time applied to this Tween. A value of 1 runs in real-time. A value of 0.5 runs 50% slower, and so on.
349366
*

0 commit comments

Comments
 (0)