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

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

1521. 【音效BUG】在游戏失焦后再次返回游戏导致音效播放异常的问题与解决方案 [ 80%]

...而自动暂停,监听游戏失焦事件:Laya.stage.on(Laya.Event.BLUR,this,this.method); 在失焦的回调里设置: Laya.SoundManager.musicMuted = true; Laya.SoundManager.stopMusic(); 将正在播放的音乐路径存为成员变量;   2.监听游戏获取焦点事件: 监听游戏获...

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

1522. 加载U3D导出的LH格式粒子特效,加载完成不回调 [ 80%]

加载U3D导出的LH格式粒子特效,加载完成不回调 this.lz = this.sceneP.addChild(Laya.Sprite3D.load("res/h5/LayaScene_Effect/Effect.lh")) as Laya.Sprite3D; this.lz.once(Event.HIERARCHY_LOADED, this,function():void{ console.error("改变大小"); }); 之前是按照ls导出的不回调...

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

1523. Laya3.0 图片拼合缩放会导致两张图片之间有一条横线[已解决] [ 80%]

...博 QZONE 微信 biubiubiu 赞同来自: 以下是测试代码         this.owner.scene.scale(1.25, 1.25) //使用缩放后 图片拼合会多一条线 2.0中没有此问题         Laya.loader.load("http://103.219.177.59:63344/%2 ... ot%3B, Laya.Loader.TEXTURE2D).then((texture: Laya.Texture...

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

1524. 求解关于跨域的具体操作 [ 80%]

...-Type','application/x-www-form-urlencoded'); xhr.once(Laya.Event.COMPLETE, this, this.completeHandler, [url, loader]); xhr.once(Laya.Event.ERROR, this, this.errorHandler); console.log("-----------------send------------------", url); xhr.send(url, "", "get", "arraybuffer"); 2018-07-04 添加评论 ...

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

1525. 写的更换纹理的代码不生效,大佬帮忙看一下。(工程附件已经上传) [ 80%]

...()没有能够清除这个节点的纹理                 (this.owner as Laya.Sprite).graphics.clear();                 var t: Laya.Texture = Laya.loader.getRes("puzzlePic/pi-" +this.levelNum +"-"+this.owner.name.slice(4,1)+ "-2.png");            ...

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

1526. 在安卓手机上drawToTexture不能正确返回纹理对象,是HTMLCanvas [ 80%]

...ID: number, sourceData?: any): void {let bounds = dragCom.getSelfBounds(); this._agentTexture = Laya.Sprite.drawToTexture(dragCom,Laya.SpriteConst.TEXTURE,bounds.width, bounds.height, -bounds.x + view.x, -bounds.y + view.y); this._agent.graphics.drawTexture(this._agentTexture, (this._agent.width - b...

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

1527. 怎样改变图片大小 [ 80%]

... 已邀请: 与内容相关的链接 提交 1 个回复 qian 赞同来自: this.bg_img.skin = "ui/bg.jpg"; this.bg_img.width = Laya.stage.width; this.bg_img.height = Laya.stage.height; Image使用skin修改显示,改变宽高时,会拉伸显示内容 2018-01-30 0 0 分享 微博 QZONE 微信 为...

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

1528. 话说Laya3D怎么自定义shader来实现后期处理呢? [ 80%]

...没有起作用啊cmd.blitScreenTriangle(sourceTexture, destTexture, null, this._shader, this._shaderData, 0); 2020-05-22 0 0 分享 微博 QZONE 微信 MQ 赞同来自: Try......................  render(context: { command: any; camera: { viewport: any; }; source: Laya.RenderTexture; def...

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

1529. XMLRequest在layaNative下请求崩溃,请求官方协助! [ 80%]

...,请求官方协助!  public post(url: string, data: any, callback: (this: void, data: JSON) => void): void {         let hr = new Laya.HttpRequest();         hr.once(Laya.Event.COMPLETE, this, (e: any): void => {             callback(JSON.parse(hr.data));         });  ...

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

1530. list删除元素,如果2个名字一样,他不会刷新颜色。 [ 80%]

...。   引用场景,卡牌融合。 比较常用的list功能。 ```  this.uiList.refresh(); 也无效 ```    this.uiList.array=[]; this.uiList.array=修改数组 this.uiList.refresh();  该数组情况,重新赋值也无效   临时解决方案: 关闭ui重新打开,这个功能比较...

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