[]为何对sp的监听事件没有反应呢?
var xxx:Laya.Sprite = new Laya.Sprite();
xxx.graphics.drawRect(0,0,100, 100,"#ffffff");
xxx.size(100, 100);
xxx.mouseEnabled = true;
xxx.x = (Laya.stage.width - xxx.width) / 2;
xxx.y = (Laya.stage.height - xxx.height) / 2;
Laya.stage.addChild(xxx);
xxx.on(Laya.Event.CLICK, this, this.onXXX);
private onXXX() {
console.debug("Hello");
}
xxx.graphics.drawRect(0,0,100, 100,"#ffffff");
xxx.size(100, 100);
xxx.mouseEnabled = true;
xxx.x = (Laya.stage.width - xxx.width) / 2;
xxx.y = (Laya.stage.height - xxx.height) / 2;
Laya.stage.addChild(xxx);
xxx.on(Laya.Event.CLICK, this, this.onXXX);
private onXXX() {
console.debug("Hello");
}
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
cuixueying
赞同来自: