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

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

141. 事件管理 · LayaAir3.3 · 引擎文档 · LAYABOX [ 84%]

...码是如何使用CLICK 的(以下代码来自“2D入门示例”): onEnable(): void { console.log("IndexRT onEnable") //侦听ui按钮点击事件 this.uiBtn.on(Laya.Event.CLICK, this, () => { //点击后,打开UI场景示例 console.log("uiBtn"); Laya.Scene.open("scenes/UiMain.ls"); })...

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

142. socket与node服务端连不上?按照官方案例 [ 84%]

... this.socket.endian = Laya.Byte.LITTLE_ENDIAN; //建立连接 this.socket.connectByUrl("ws://45.78.**.**:3000"); this.socket.on(Laya.Event.OPEN, this, openHandler); this.socket.on(Laya.Event.MESSAGE, this, receiveHandler); this.socket.on(Laya.Event.CLOSE, this, closeHandler); this.socket.on(Laya.Eve...

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

143. 绘制形状时事件不触发 [ 84%]

绘制形状时事件不触发 function myRing(x,y,r1,color1,r2,color2) {         this.sprite = new Laya.Sprite();     this.sprite.on('mousedown', this, on_down);     this.sprite.graphics.drawCircle(x, y, r2, color2, color2, 2);     this.sprite.graphics.drawCircle(x, y, r1, color1, color...

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

144. 一个LayaAir moveout target 设计上的疑问? [ 84%]

...        sp[j + i * 10].pos(i * 60, j * 60);         sp[j + i * 10].on(Laya.Event.MOUSE_OVER, this, over);         sp[j + i * 10].on(Laya.Event.MOUSE_OUT, this, out);     } } function over(e) {     e.target.graphics.drawRect(0, 0, 50, 50, "red"); } function out(e) {     //正常大...

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

145. 怎样监听list里的组件 [ 84%]

...面name为select_img ,我写的 this.list_box.getChildByName("select_img").on 报错  on is not a function ?    2018-07-04 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_Aaron 赞同来自: 你获取到的...

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

146. [LayaAirIDE3]2d相机打包后问题 [ 84%]

...?   附件 : --> 2025-11-25 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 3 个回复 LayaAir小牛 赞同来自: 可以发一个demo吗?简单一点的就好 2025-11-25 0 0 分享 微博 QZONE 微信 1756447350用户 ...

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

147. button响应鼠标事件有两种方式,哪个更好用些? [ 84%]

button响应鼠标事件有两种方式,哪个更好用些? 一个是mouseHandler 一个是监听事件的button.on(Laya.Event.MOUSE_UP)   推荐用哪一种? 用button.on的方式是不是窗口关闭了我要手动移除事件? 2016-10-05 添加评论 免费帖 --> 分享 微博 QZONE ...

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

148. 用Socket连接服务器,服务端显示已经有登录,但Event.OPEN没有触发 [ 84%]

...;     import laya.utils.Byte;               public class CConnector extends Socket     {         protected var sendBuf:Byte = null;         protected var recvBuf:Byte = null;                  public function CConnector()         {     ...

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

149. Event触发不了 [ 84%]

...rawRect(100, 200, 50, 50, "#000"); btn.pos(100, 200); btn.size(50,50); btn.on(Event.MOUSE_DOWN, this, function():void {console.log(1);}); btn.on换成Laya.stage.on是可以触发的,但是btn却触发不了。 麻烦解答,谢谢。 2017-05-25 添加评论 免费帖 --> 分享 微博 QZONE 微...

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

150. 动画不显示 [ 84%]

动画不显示 使用  Animation.createFrames(  创建动画模版的动画,在调试器和浏览器上显示都正常 但是打包成测试APK,动画却不显示。 游戏有2个图层 ,地图层和一个角色动画,打包成APK后,地图层正常显示,角色动画不显示,打...

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