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

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

1791. 关于button的click监听 [ 77%]

...AAAA"; btn.pos(200,200); Laya.stage.addChild(btn); btn.on(Laya.Event.CLICK,this,()=>{console.log("click button");});   请问 这样监听不到button的点击事件吗?如果我创建一个ui.view  a  a.on 也监听不到吗 2017-11-28 添加评论 免费帖 --> 分享 微博 QZONE 微信 ...

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

1792. 如何使用graphics.loadImage加载图片资源的时候,如何判断加载失败? [ 77%]

...mage加载图片资源的时候,如何判断加载失败? 伪代码: this.avatar.graphics.loadImage(url, 0, 0, 0, 0, __complete);这个时候,如果我的url为空或者为一个不存在的图片地址,我如何判断它加载失败呢? 我尝试使用了这样的代码来获取失败...

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

1793. 怎么实现一个Timer的loop的delay时间越来越短? [ 77%]

...ect(0,0,200,200,"#FF0000"); Laya.stage.addChild(sp); Laya.timer.loop(delay,this,onLoop); } private function onLoop():void { delay-=50; sp.x+=20; Laya.timer.clear(this,onLoop); Laya.timer.loop(delay,this,onLoop); } 2017-06-26 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要...

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

1794. 2d物理引擎中,onTriggerEnter函数中的contact参数的getHitInfo函数无效 [ 77%]

...来自: contack.getHitInfo = function () { 这一行上面 写 let that = this; 把this保存下来, 然后把 var mainfold = new Physics.I.box2d.b2WorldMainfol(); 改为 var mainfold = new that.box2d.b2WorldMainfol(); 2020-07-10 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折...

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

1795. 文本-下划线 [ 77%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createTexts(); } private createTexts(): void { this.createText('left', 1, null, 100, 10); this.createText('center', 2, "#00BFFF", 155, 150); this.createText('right', 3, "#FF7F50", 210, 290); } private createText(align: s...

来源: Laya_示例 发布时间: 20260303

1796. 3种支持语言在选择上有讲究吗? [ 77%]

...博 QZONE 微信 flyByself 赞同来自: 在用AS  TS写法 也很繁琐 this. this. this. 个人觉得还是as简单 2018-02-21 0 0 分享 微博 QZONE 微信 157*****121 赞同来自: 多人协同项目,必须的as,    ts ,js 用起来都非常蛋疼!对于as 淘汰的说话。。。laya只...

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

1797. 加载资源时同时加载两遍 [ 77%]

...改了一下,你把这个代码替换一下就好了 if(hero == null) { this.tiledmap.name = "xx00"; var viewRect = new Rectangle(0,0,1080,1100); this.tiledmap.createMap("../laya/assets/map/beitianting.json",viewRect,Handler.create(this,onMapCreated)); }   仙魔世界测试.rar 2017-11-20 0 0 ...

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

1798. 超出文本区域的处理&滚动文本(JavaScript-LayaAir基础篇(JS)-文本) [ 77%]

... txt.color = "#ffffff"; Laya.stage.addChild(txt); txt.on(Event.MOUSE_DOWN, this, startScrollText); } /* 开始滚动文本 */ function startScrollText(e) { prevX = txt.mouseX; prevY = txt.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, scrollText); Laya.stage.on(Event.MOUSE_UP, this, finishScrollText)...

来源: Laya2.0_文档 发布时间: 20210714

1799. [2.2.0]Label斜体不显示文字, 100%复现, 这次不闪退了 [ 77%]

...2.2.0 还是老规矩,  官方2D示例修改,  将文字设为斜体.   this.tipLbll.italic = true; //这是重点 this.tipLbll.bold = false; this.tipLbll.text = "A测试B"; 进游戏死掉, 并未显示文字   android_studio.zip 附件 : --> 2019-07-30 添加评论 免费帖 --> 分享 微博...

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

1800. 列表嵌套另外一个列表 [ 77%]

...-23 10:57 那怎么找里面的那个list w1114367261 • 2018-05-23 11:57 this.storelist.renderHandler=new Handler(this,onRender);//当list刷新时触发 并发送Box,index this.storelist.mouseHandler = new Handler(this,onMouse);//当list被点击时触发 并发送event,index } public function ...

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