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

大约有 569 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0038 秒)

381. 2.0按钮添加事件报错 cannot read property 'on' fof undefined [ 50%]

...tends ui.login.login_bgUI { constructor() { super(); this.btn_register.on("click", this, this.ToRegisterPage); } ToRegisterPage() : void { this.loadScene("login/register_page"); } }   //调用on的时候 直接会报Cannot read property 'on' of undefined   我再把生成的ui代码贴出来 expor...

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

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

..."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

383. 阻止点击穿透问题 [ 50%]

...。 代码如下:  骰子的点击事件代码: 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

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

...; 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

385. 图片区域点击有问题 [ 50%]

...信 yung 赞同来自: 可以用以下方法排查 你监听一个stage的click事件,打印出target是谁,看看被谁挡着了 其次看看mouseenable是否正常,view页面设置宽高是否特别小 2018-04-26 0 1 分享 微博 QZONE 微信 13632637059 赞同来自: 这个是demo 我是...

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

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

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

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

387. list组件在微信小游戏的上屏中点击定位不准 [ 50%]

...事件,但是不生效。我在上一页文本上增加了点击事件,click后应该console.log,但是现在没有反应。   study.rar附件是小游戏的demo。   gif附件是bug的录像。   附件 : --> study.rar 2018-04-23 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...

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

388. 新版版2d粒子问题?同样的代码,LayaAir IDE 2.1.0版本正常,LayaAir IDE 2.2.0beta2版本报错 [ 50%]

...正常,LayaAir IDE 2.2.0beta2版本报错    Laya.stage.on(Laya.Event.CLICK, this, () => {             Laya.loader.load("HallAni/star.part", Laya.Handler.create(this, (settings) => {                 let Particle2D = Laya.Particle2D;               ...

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

389. 龙骨skeleton鼠标点击区域的设置 [ 49%]

...w Rectangle(-420,-680,420,680); mArmature.hitArea=rect; mArmature.on(Event.CLICK,this,onClick);    2016-11-22 0 0 分享 微博 QZONE 微信 asdf131 赞同来自: 于一个点为中心播放 :      this.mArmature = this.mFactory.buildArmature(0);         this.mArmatureSpr.addChild(this.mA...

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

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

...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