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

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

261. Sprite3D添加组件或脚本(TypeScript-3D基础(TS)-LayaAir3D之精灵) [ 75%]

...ew Laya.Vector3(0, 0.01, 0); constructor(){ super(); } onAwake() { console.log("onAwake"); } onStart() { console.log("onStart"); } onUpdate() { (this.owner as Laya.Sprite3D).transform.rotate(this.rotation, false); } onLateUpdate() { console.log("onLateUpdate"); } } ``` 这样脚本就添加完成了...

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

262. Laya下怎么实现复制 [ 75%]

...!"); e.clearSelection(); }); clipboard.on('error', function(e) { console.log("复制失败!",e); }); 2018-06-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 4 个回复 Laya_Aaron 赞同来自: 这个就是用原生用...

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

263. 在微信分享成功的回调函数里,Laya播放音效失败。 [ 75%]

...e = true; gameex.bar.destoyRankSprite()  this.nCountDown = 15; // console.log(gameex.snakeSelf) } })     //暂停 GameEx.prototype.pause = function () { console.log("停止播放音乐") Laya.SoundManager.stopMusic(); //停止游戏主循环 Laya.timer.clear(this, this.onLoop); //移除舞台的...

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

264. 如何设置js加载顺序? [ 75%]

...发觉Main不存在的。   我分别在两个文件里加上了console.log("Main"), console.log("game"),发现game.js是执行比Main.js早的,所以出现Main不存在的错误 2018-06-02 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关...

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

265. 在微信小游戏中,主域中显示开发域的list为什么显示不全? [ 74%]

...         wx.onMessage(data => {             console.log(data);             if (data.isDisplay) {                 wx.getFriendCloudStorage({                     success: res => {                         ...

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

266. 当使用代码创建打开场景时,onOpened触发了,但场景active和activeInHierarchy还是处于false,请问纯代码怎么实现场景创建激活,谢谢 [ 74%]

...?   const scene = new Laya.Scene(); scene.onOpened = () => { console.log('scene onOpened'); }; scene.open(); console.log('scene', scene.active, scene.activeInHierarchy); Laya.timer.frameOnce(10, this, () => {   console.log('scene 2', scene.active, scene.activeInHierarchy); });   日志:...

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

267. [LayaAirIDE3]Laya.loader.on(Event.ERROR, this, this.onError) 无法侦听到加载资源失败 [ 74%]

...setLoaded(): void     {         // 使用texture         console.log("加载结束");     }      // 加载进度侦听器     private onLoading(progress: number): void     {         console.log("加载进度: " + progress);     }      private onError(err: string): void  ...

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

268. setSubPixels画布擦除不掉 [ 74%]

...ls画布擦除不掉 this.btn.label = Math.random().toString(); // console.log(Math.random()); let tex:Laya.Texture = Laya.Loader.getRes(this.bUrl); let x:number = this._testStatus == true ? 0:50;//Math.random()>0.5 ? 50 : 0; this._testStatus = !this._testStatus; // let canvasInfo = this.getCanva...

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

269. 请问老师为什么我按照官网的实例播放音频没反应呢? [ 74%]

...stage.addChild(button); return button; } function onPlayMusic(e) { console.log("播放音乐"); SoundManager.playMusic("../../res/sounds/bgm.mp3", 1, new Handler(this, onComplete)); } function onPlaySound(e) { console.log("播放音效"); SoundManager.playSound("../../res/sounds/btn.mp3", 1, new Han...

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

270. 二进制文件打包后,读取不到zip包内的文件 [ 74%]

... let getres = Laya.loader.getRes(item)             console.log('getres',getres) //这个返回undefined          })) 附件 : --> testLaya3d.zip 2021-06-04 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提...

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