mirror of
https://github.com/photonstorm/phaser
synced 2024-11-17 10:18:42 +00:00
Setting initial current
Setting initial current location
This commit is contained in:
parent
1db9e15a76
commit
1cbceb215d
1 changed files with 5 additions and 1 deletions
|
@ -1208,6 +1208,10 @@ var Tween = new Class({
|
|||
tweenData.state = TWEEN_CONST.COMPLETE;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!tweenData.elapsed && tweenData.current) {
|
||||
tweenData.elapsed = tweenData.duration * tweenData.current;
|
||||
}
|
||||
|
||||
var elapsed = tweenData.elapsed;
|
||||
var duration = tweenData.duration;
|
||||
|
@ -1319,7 +1323,7 @@ var Tween = new Class({
|
|||
|
||||
tweenData.end = tweenData.getEndValue(tweenData.target, tweenData.key, tweenData.start);
|
||||
|
||||
tweenData.current = tweenData.start;
|
||||
tweenData.current = tweenData.current || tweenData.start;
|
||||
|
||||
tweenData.target[tweenData.key] = tweenData.start;
|
||||
|
||||
|
|
Loading…
Reference in a new issue