用的版本是3.3.1.
在使用tween函数时,如果对移动的物体大小进行了改变,然后该物体的点击事件监听不到了。
代码如下:
start () {
this.spr.node.on( Node.EventType.TOUCH_END, this.onClick, this );
}
private onClick():void{
let self = this;
tween( this.spr.node ).to( 1,{position:new Vec3(100,100)} ).call(function(){
self.spr.node.setPosition(new Vec3(0,0));
// self.spr.node.scale=new Vec3(1,1);
}).start();
}