[LayaAir 2.0]关于mouseThrough设计原理问题?

关于 mouseThrough 的设计原理,如果sprite对象没有设置点击事件(如 Event.CLICK),那么 sprite.mouseThrough = false;设置是没有效果的,这样设计是不是有问题?
var a:Sprite = new Sprite();
a.graphics.drawRect(0,0,200, 200, "#00ff00");
a.size(200, 200);
a.pos(0, 0);
a.on(Event.CLICK, null, function(e:Event):void{ trace("click a"); })
Laya.stage.addChild(a);


var b:Sprite = new Sprite();
b.graphics.drawRect(0,0,200, 200, "#0000ff");
b.size(200, 200);
b.pos(100, 100);
b.mouseThrough = false;
//b.on(Event.CLICK, null, function(e:Event):void{ trace("click b"); });
Laya.stage.addChild(b);
已邀请:

Laya_Xq

赞同来自:

这个是依托于event.click的

要回复问题请先

商务合作
商务合作