[]scrollRect 改变后子对象的鼠标事件失效
bg=new Laya.Sprite();
Laya.stage.addChild(bg);
bg.size(800,600);
bg.loadImage("aa_1.Png",0,0,800,600);
poly=new Laya.Sprite();
bg.addChild(poly);
poly.size(36,36);
poly.pivot(18,18);
poly.loadImage("SafeExitL.png",0,0,36,36);
poly.pos(400,300);
poly.on("mousedown", this, polyonMouseDown);
bg.scrollRect=new Laya.Rectangle(100,100,700,500);
bg.scale(1.5,1.5);
-----------------------------------------------------------------------------
加上这句bg.scrollRect=new Laya.Rectangle(100,100,700,500); 子对象的鼠标事件失效了
Laya.stage.addChild(bg);
bg.size(800,600);
bg.loadImage("aa_1.Png",0,0,800,600);
poly=new Laya.Sprite();
bg.addChild(poly);
poly.size(36,36);
poly.pivot(18,18);
poly.loadImage("SafeExitL.png",0,0,36,36);
poly.pos(400,300);
poly.on("mousedown", this, polyonMouseDown);
bg.scrollRect=new Laya.Rectangle(100,100,700,500);
bg.scale(1.5,1.5);
-----------------------------------------------------------------------------
加上这句bg.scrollRect=new Laya.Rectangle(100,100,700,500); 子对象的鼠标事件失效了
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
Aar0n
赞同来自: