Fix Tween.callbackScope

This commit is contained in:
Shin 2022-10-14 21:10:21 +07:00
parent e554be84bc
commit 96052dba5c
4 changed files with 4 additions and 3 deletions

View file

@ -18,6 +18,7 @@ var Tweens = {
TweenManager: require('./TweenManager'),
Tween: require('./tween/Tween'),
TweenData: require('./tween/TweenData'),
TweenFrameData: require('./tween/TweenFrameData'),
BaseTween: require('./tween/BaseTween'),
TweenChain: require('./tween/TweenChain')

View file

@ -501,7 +501,7 @@ var TweenChain = new Class({
if (handler)
{
handler.func.apply(handler.scope, [ this ].concat(handler.params));
handler.func.apply(this.callbackScope, [ this ].concat(handler.params));
}
},

View file

@ -480,7 +480,7 @@ var TweenData = new Class({
var key = this.key;
var current = this.current;
var previous = this.previoius;
var previous = this.previous;
tween.emit(event, tween, key, target, current, previous);

View file

@ -363,7 +363,7 @@ var TweenFrameData = new Class({
if (handler)
{
handler.func.apply(handler.scope, [ tween, target, 'texture' ].concat(handler.params));
handler.func.apply(tween.callbackScope, [ tween, target, 'texture' ].concat(handler.params));
}
}
},