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

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

241. [LayaNative2]pad外设键盘无法捕获到KEY_DOWN,KEY_UP,KEY_PRESS事件 [ 84%]

...请问该如何解决?   以下事件无法触发: Laya.stage.on(Laya.Event.KEY_PRESS, this, this.handleKeypress); Laya.stage.on(Laya.Event.KEY_DOWN, this, this.handleKeydown); Laya.stage.on(Laya.Event.KEY_UP, this, this.handleKeyup);   版本:2.13.3 附件 : --> 事件代码.docx 2024-02-28...

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

242. 关于新手引导 [ 84%]

...estination-out    package view { import laya.display.Sprite; import laya.events.Event; import laya.resource.Context; import laya.utils.Browser; import laya.utils.HitArea; public class KouTu extends Sprite { private var box:Sprite; private var interactionArea:Sprite; private var maskArea:Sprite; pr...

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

243. 龙骨动画的监听回调,有时能回调,有时不能回调 [ 84%]

...c initTemplet(){ this.mFactory = new Laya.Templet(); this.mFactory.on(Laya.Event.COMPLETE, this, this.parseComplete); // this.mFactory.on(Laya.Event.STOPPED,this,this.parseComplete); this.mFactory.on(Laya.Event.ERROR, this, this.onError); this.mFactory.loadAni("res/games/Game_ddz/animation/ddz_figur...

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

244. 超出文本区域的处理&滚动文本(ActionScript-LayaAir基础篇(AS3)-文本) [ 84%]

...有效果。 ```typescript package { import laya.display.Text; import laya.events.Event; import laya.utils.Browser; import laya.webgl.WebGL; public class Text_Scroll { private var txt:Text; private var prevX:Number = 0; private var prevY:Number = 0; public function Text_Scroll() { // 不支持WebGL...

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

245. 手机调试时http请求错误,返回Request failed Status:0 [ 84%]

...段: let hr = new Laya.HttpRequest(); hr.http.timeout = 5000; hr.on(Laya.Event.PROGRESS, this, this.onHttpRequestProgress); hr.once(Laya.Event.COMPLETE, this, (response)=>{ UIFactory.closeWaitBar(); this.onHttpRequestComplete(response); if(handleOk){ handleOk(response); } }); hr.once(Laya.Event...

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

246. Laya的Dialog上如果有按钮 我希望点击到按钮或者其他可以相应的控件 不会触发拖动效果 [ 84%]

...rag:boolean) { this.m_CanDrag = canDrag; if(this.m_CanDrag) { this.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown); } else { this.off(Laya.Event.MOUSE_DOWN, this, this.onMouseDown); } }  onMouseDown(e: Laya.Event) { // console.log(e.currentTarget, e.target); if(e.target == this) { this.startDrag(...

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

247. 移动端h5项目如何获取多点触摸的坐标 [ 84%]

...相关的链接 提交 2 个回复 158*****871 赞同来自: Laya.stage.on(Event.MOUSE_DOWN, this, this.onMouseDown);     onMouseDown(e) { const Event = Laya.Event;   // 手机上才有 touches 属性 let touches = e.touches;   if (touches && touches.length == 2) { preRadian = Math.atan2...

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

248. 在UI类里调用启动类的静态函数失败了 [ 84%]

...o extends ui.GameInfoUI { constructor() { super(); this.kaishi_btn.on(Laya.Event.MOUSE_DOWN, this, this.onStart); // Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.birdFly);//可以绑定两个函数 Laya.stage.on(Laya.Event.KEY_DOWN, this, this.birdFly); this.init(); } public init(): void { Laya.T...

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

249. 微信小游戏中加载unity导出的场景报错the .lh file root type must be Scene [ 84%]

...  Utils3D._createNodeByJson(this,json,this,innerResouMap);     this.event("hierarchyloaded",[this]);     this.__loaded=true;   }   打了一个log,发现data[0]读取出来的结果是"{",也就是说data被按照字符串读取了,而不是数组。   /**     *结束加载,...

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

250. Touch接口缺少stageX,stageY [ 83%]

...指旋转(多点触控)”有这样的代码: private onMouseDown(e: Event): void {             var touches: Array<any> = e.touches;             if (touches && touches.length == 2) {                 this.preRadian = Math.atan2(                     to...

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