// 飞机 x 轴位置
var tx = new PIXI.Text();
plane.addChild(tx);
tx.x = 70;
// 飞机 y 轴位置
var ty = new PIXI.Text();
plane.addChild(ty);
ty.y = 60;
ty.x = -20;
bg.interactive = true;
bg.on("mousemove",move);
function move(event){
var pos = event.data.getLocalPosition(app.stage);
plane.x=pos.x;
plane.y=pos.y;
}
function move(event){
var pos = event.data.getLocalPosition(app.stage);
tx.text = plane.x=pos.x;
ty.text = plane.y=pos.y;
}
有用望采纳