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

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

1471. 播放swf动画的时候,有的时候会崩溃在这里, Cannot read property 'dir' of undefined [ 81%]

...有的时候会崩溃在这里, Cannot read property 'dir' of undefined this.basePath=this._atlasPath?Loader.getAtlas(this._atlasPath).dir:this._url.split(".swf")[0]+"/image/"; 2018-04-03 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的...

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

1472. 实体组件系统 · LayaAir3.4 · 引擎文档 · LAYABOX [ 81%]

...per(); } onEnable(): void { //设置初始速度 let rig: Laya.RigidBody = this.owner.getComponent(Laya.RigidBody); rig.setVelocity({ x: 0, y: -10 }); } onTriggerEnter(other: any, self: any, contact: any): void { //如果被碰到,则移除子弹 this.owner.removeSelf(); } onUpdate(): void { //如...

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

1473. [0]Timer的偶发性Bug [ 81%]

...回复 cmxStar 赞同来自: 我们项目也遇到过这bug, 改成 delete this._map[handler.key]; 2023-10-26 0 2 分享 微博 QZONE 微信 _Nodep_ 赞同来自: 嗯,合理 2023-10-26 0 0 分享 微博 QZONE 微信 开房车环游世界 赞同来自: Tween 偶尔停止 我记得当年做laya1.0...

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

1474. 请问如何监听html的button元件ontouchstart,ontouchend等事件 [ 81%]

...d等事件 如题,我可以如下为button加上onclick的监听事件。this.btn_CloseWebiFrame = laya.utils.Browser.window.document.createElement('button'); this.btn_CloseWebiFrame.onclick = () => { console.log("onclick"); };  oncontextmenu也没有问题。this.img_closeWebiFrame.oncontextm...

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

1475. 显示对象的遮罩调用clear后还是能看到显示对象 [ 81%]

...: 补充,如果这样做就可以达到效果,但是屏幕会闪一下 this.img.mask = null; this.imgmk.graphics.clear(); this.img.mask = this.imgmk; 2020-04-16 0 0 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: 遮罩尺寸如果小于0.5就无效的,直接拿掉遮罩即可。 2020-...

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

1476. 使用百度地图显示当前位置(ActionScript-LayaAir基础篇(AS3)-硬件设备相关) [ 81%]

...tion.enableHighAccuracy = true; Geolocation.watchPosition(Handler.create(this, updatePosition), Handler.create(this, onError));   // 绑定convertToBaiduCoord作用域 __JS__("this.convertToBaiduCoord = this.convertToBaiduCoord.bind(this)"); } ``` ​ 由于本例不需要使用LayaAir的...

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

1477. Shader预编译解决方案 [ 81%]

...:Laya.DefineDatas  参考接口 _render(context) {     ...     this._material._shaderValues._defineDatas.cloneTo(comDef);     var shader = context.shader = this._material._shader.getSubShaderAt(0)._passes[0].withCompile(comDef);     ... }  Laya.ShaderPass -> withCompil...

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

1478. 手机QQ厘米秀GLTF模型使用说明(TypeScript-小游戏适配文档-QQ小游戏) [ 81%]

...truct(); // gltf 模型资源对象 struct.gltfURL = {}; for (const key in this.gltfFile) { struct.gltfURL[key] = this.gltfFile[key]; } // 个性化配置对象 / 可省略 struct.customConfigURL = "res/self/gltfMode/gltfBin/face.json"; // makeup装扮对象 / 可省略 struct.makeupConfigURL = this...

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

1479. 打地鼠游戏中,锤子被挡在背景图后面了,请问怎么调整?谢谢 [ 81%]

... 加到舞台上时是加到GameViwe上, 不是直接加到Laya.stage上 this.hammer = new Hammer(); this.addChild(this.hammer); this.hammer.start();   2018-08-15 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 Cherry006 相关问题 ...

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

1480. Laya.Loader.getRes请教 [ 81%]

...教 Laya.loader.load("res/atlas/games/game_13/image.atlas", Handler.create(this, this.createView)); 在createView回调里面调用 let tex: Texture = Laya.Loader.getRes("image/shake_01.png"); 想拿图集中的某一张图片。发现拿不到这张图片。 但是我换个默认的图集Laya.loade...

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