鼠标点击按钮,让按钮跟随鼠标移动

求救 这个怎么实现

跟坐标移动。。。。。。。。

//拖动
dragMove: function (event) {
let hero_x = this.node.x;
let hero_y = this.node.y;
//飞机不移出屏幕
let minX = -this.node.parent.width / 2 + this.node.width / 2;
let maxX = -minX;
let minY = -this.node.parent.height / 2 + this.node.height / 2;
let maxY = -minY;
let delta = event.touch.getDelta();
if (delta.x === 0 && delta.y === 0) {
return;
}
hero_y += delta.y;
hero_x += delta.x;
if (hero_x < minX) {
hero_x = minX;
}
if (hero_x > maxX) {
hero_x = maxX;
}
if (hero_y < minY) {
hero_y = minY;
}
if (hero_y > maxY) {
hero_y = maxY;
}

    this.node.runAction(cc.moveTo(0.4, hero_x, hero_y));
},