Skip to content

Commit fcca6ba

Browse files
committed
Fixed TweenManager.isTweening() and .removeFrom()
Updated invalid reference Tween._object to .target
1 parent e271c63 commit fcca6ba

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/tween/TweenManager.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,15 @@ Phaser.TweenManager.prototype = {
156156
{
157157
for (i = 0, len = this._tweens.length; i < len; i++)
158158
{
159-
if (obj === this._tweens[i]._object)
159+
if (obj === this._tweens[i].target)
160160
{
161161
this.remove(this._tweens[i]);
162162
}
163163
}
164164

165165
for (i = 0, len = this._add.length; i < len; i++)
166166
{
167-
if (obj === this._add[i]._object)
167+
if (obj === this._add[i].target)
168168
{
169169
this.remove(this._add[i]);
170170
}
@@ -279,7 +279,7 @@ Phaser.TweenManager.prototype = {
279279
isTweening: function(object) {
280280

281281
return this._tweens.some(function(tween) {
282-
return tween._object === object;
282+
return tween.target === object;
283283
});
284284

285285
},

0 commit comments

Comments
 (0)