0
IM试图与自来水事件的圆圈按钮,我用hitArea属性的精灵类和使用Pixi的Circle类我这样做移相器,圆形按钮
this.sprite = game.add.sprite(50,50,"cursors");
this.sprite.anchor.set(0.5,0.5);
this.sprite.hitArea = new PIXI.Circle(50,50,84);
this.sprite.inputEnabled = true;
this.sprite.events.onInputDown.add(function(){
console.log("clicked");
});
};
它不是在所有 工作,所以我试图消除this.sprite.anchor.set(0.5,0.5);
输入做工精细当没有命中面积,我应该怎么办
注: 移相器的版本是2.2.2