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

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

1. 开放数据域组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 100%]

...gnore wx.setUserCloudStorage({ KVDataList: KVDataList, success: () => { console.log("数据保存成功") }, fail: () => { console.log("数据保存失败") }, complete: () => { console.log("执行调用结束回调") } }); } } 然后是getFriendCloudStorage方法,来到开放数据域的...

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

2. HTTP通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 94%]

...@param e 事件对象 */ private onHttpRequestError(e: any = null): void { console.error("请求失败:", e); this.logger.text = "请求失败,请重试。\n"; } /** * 请求进度改变触发的回调 * @param e 事件对象 */ private onHttpRequestProgress(e: any = null): void { //进度的百...

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

3. 程序蓝图 · LayaAir3.3 · 引擎文档 · LAYABOX [ 82%]

...}) get testParams():string{ return "test"; } set testParams(value:string){ console.log(value); } // 静态 get & set @bpAccessor({ "type":"string", "modifiers": { "isStatic": true } }) static get testStaParams():string{ return "test"; } static set testStaParams(value:string){ console.log(value);...

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

4. 预制体模块 · LayaAir3文档 · LAYABOX [ 77%]

...operty( { type : Laya.Scene3D } ) private scene: Laya.Scene3D; onStart() { console.log("Game start"); //加载预制体文件 Laya.loader.load("resources/Prefab.lh").then( (res)=>{ //创建预制体 let monkey: Laya.Sprite3D = res.create(); //添加预制体到场景中 this.scene.addChild( monke...

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

5. 预制体 · LayaAir3.3 · 引擎文档 · LAYABOX [ 77%]

...operty( { type : Laya.Scene3D } ) private scene: Laya.Scene3D; onStart() { console.log("Game start"); //加载预制体文件 Laya.loader.load("resources/Prefab.lh").then( (res)=>{ //创建预制体 let monkey: Laya.Sprite3D = res.create(); //添加预制体到场景中 this.scene.addChild( monke...

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

6. 其他 · LayaAir3.3 · 引擎文档 · LAYABOX [ 76%]

...config.js中定义,代码如下: window.onLayaInitError=function(e) { console.log("onLayaInitError error=" + e); alert("加载游戏失败,可能由于您的网络不稳定,请退出重进"); } 开发者可以根据自己需求,修改报错信息和报错方式。 9. 获取设备型号 在...

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

7. 引用外部脚本的方式 · LayaAir3.3 · 引擎文档 · LAYABOX [ 75%]

...Main extends Laya.Script { private aStarInstance: AStarFinder; onStart() { console.log("Game start"); // 0表示通路,1表示障碍 let myMatrix = [ [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 1, 1, 0, 1, 1, 0], [0, 0, 1, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1, 0], [1, 1, 1, 0, 1, 0,...

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

8. vivo小游戏 · LayaAir3.3 · 引擎文档 · LAYABOX [ 73%]

...s.create(); this.scene3d.addChild(sp3); }); }) } printProgress(res: any) { console.log("加载进度" + JSON.stringify(res)); } } 这里介绍一下printProgress打印的内容,在小游戏调试器平台打我们导出的项目后,连接vivo官网提供的调试地址会打印如下日志: ...

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

9. 浏览器接口 · LayaAir3.3 · 引擎文档 · LAYABOX [ 70%]

...注册 Laya.Browser.window.addEventListener("click", (event: any) => { console.log(event.type); }) Window.open() 方法、window.postMessage()方法、Window.addEventListener()方法 3.3 container 画布 LayaAir引擎里可以通过 Laya.Browser.container 获取画布容器。 比如,我们可...

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

10. 支付宝小游戏 · LayaAir3.3 · 引擎文档 · LAYABOX [ 69%]

...s.create(); this.scene3d.addChild(sp3); }); }) } printProgress(res: any) { console.log("加载进度" + JSON.stringify(res)); } } 代码中printProgress会打印加载进度日志,效果如下所示: (图4-2) Copyright ©Layabox 2025 all right reserved,powered by LayaAir Engine更新时间...

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