• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 441 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0063 秒)

271. iphoneX 用微信打开游戏,,做新手引导 抠图有问题,,, [ 53%]

..."bitmap"; Laya.stage.addChild(this.guideContainer); this.gameContainer.on("click", this, this.nextStep); //绘制遮罩区,含透明度,可见游戏背景 this.maskArea = new Sprite(); this.maskArea.alpha = maskAlpha; this.maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, mas...

来源: Laya_社区 发布时间: 20180116

272. 阻止点击穿透问题 [ 53%]

...。 代码如下:  骰子的点击事件代码: this.items.shaizi.on("click", this, function(e) { e.stopPropagation(); if(!Game.runing) { Game.runing = true; Game.stepNum = Math.floor(Math.random() * 6) + 1; console.log(Game.stepNum) Animate.role(Game.stepNum); } },[this.items.shaizi]);  弹...

来源: Laya_社区 发布时间: 20180601

273. Laya List给子元素添加事件后,滚动事件被劫持了 [ 53%]

...; list.loadImage('xxx.png'); //此处无论是这样给 list.on(Laya.Event.CLICK, this, () => { console.log(413132131) }) //还是在handler中去渲染,都会滚动不了 txArray.push(list);} storeTxList.array = txArray;   Laya.stage.addChild(storeTxList);     悬赏找大神看问题 expor...

来源: Laya_社区 发布时间: 20190711

274. list中加的button不能接收点击事件 求一个list中加button的demo [ 52%]

...       console.log("3333333333333");         if (cell.useBtn.clickHandler == undefined) {             cell.useBtn.on("click", this, this.onItemUse, [index]);         }     }     onItemUse(index):void{         console.log("11111111111111111");     }   ...

来源: Laya_社区 发布时间: 20170310

275. 列表组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 52%]

...了。 如果要侦听点击某一个item的事件,不必每个item加上Click事件的侦听器,而是直接侦听列表的ClickItem事件: list.on(Laya.UIEvent.ClickItem, this, this.onClickItem); // 回调函数的第一个参数就是当前被点击的对象 function onClickItem(item: GObje...

来源: Laya3.0_文档 发布时间: 20251128

276. 显示对象的mask缩放为0时遮罩效果不生效 [ 52%]

...Child(testSp); let i = 0; tmpMask.scaleX = i / 3; Laya.stage.on(Laya.Event.CLICK, this, ()=>{ i = (i + 1) % 4; tmpMask.scaleX = i / 3; }); 附件 : --> 2020-04-21 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 3 个回复 ...

来源: Laya_社区 发布时间: 20200421

277. ls场景文件通过Laya.loader.create()预加载后stage.destroyChildren()出现异常Cannot read property 'visible' of null [ 52%]

...附Demo。   想做不同场景之间的切换。 spriteBtn.on(Laya.Event.CLICK, this, function (e) { Laya.stage.destroyChildren(); newScene(); });问题:LayaAirUnityPlugin 1.1.0导出了 ls 场景文件,在通过Laya.loader.create()预加载后。在3次Laya.Scene.load()后,最后一次 Laya...

来源: Laya_社区 发布时间: 20170615

278. Animation 使用疑问 [ 51%]

... Animation 使用疑问 清理问题 内存没有发生变化 private onBtnClick(): void { this.body = new Laya.Animation(); this.body.y = -100; this.body.interval = 50; this.addChild(this.body); this.body.play(0, true, "hero_fly"); } private body: Laya.Animation; private onBtn2Click(): void { this....

来源: Laya_社区 发布时间: 20170615

279. list点击label保留一种状态 [ 51%]

...ndex = data[index]; var label = item.getChildByName('lab'); label.on(Event.CLICK,this,onClickBtn,[index]); } function onClickBtn(index){ for(var q = 0;q < 10;q++){ record_slide_list.getCell(q).getChildByName('lab').bgColor = '#f3d9b4'; } record_slide_list.getCell(index).getChildByName('lab').bgCo...

来源: Laya_社区 发布时间: 20170803

280. Layabox web 复制一段文字到剪贴板 [ 51%]

... console.log(e) clipboard.destroy(); })  //确认按钮 this.confirmBtn.onclick = function () { _this.CloseDivAndInfoMesg(this); } // 创建弹出层 遮罩层 等 if (!document.getElementById("mask") && 1) { //mask div this.newMask.id = "mask"; this.newMask.style.position = "absolute"; thi...

来源: Laya_社区 发布时间: 20181214