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

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

1. 其他 · LayaAir3.4 · 引擎文档 · LAYABOX [ 100%]

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

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

2. 动态图集 · LayaAir3.4 · 引擎文档 · LAYABOX [ 97%]

...ture2, texture3]; const successCount = atlasManager.addTextures(textures); console.log(`成功添加 ${successCount} 个纹理`); const urls = [ "resources/ui/button.png", "resources/ui/panel.png", "resources/ui/icon.png" ]; Laya.loader.load(urls).then(() => { atlasManager.addTexturesByUrl(urls);...

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

3. 脚本编译 · LayaAir3.4 · 引擎文档 · LAYABOX [ 82%]

...dComponentScripts)2.2 删除 debugger 语句(dropDebugger)2.3 删除 console 语句(dropConsole)2.4 压缩(minify)脚本编译 Author: Charley 脚本编译配置用于控制 TypeScript 编译行为 以及 发布版本的代码处理方式。 整体分为两部分: 脚本编译选项...

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

4. 开放数据域组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 77%]

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

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

5. HTTP通信 · LayaAir3.4 · 引擎文档 · LAYABOX [ 72%]

...@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

6. 程序蓝图 · LayaAir3.4 · 引擎文档 · LAYABOX [ 64%]

...}) 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

7. 预制体模块 · LayaAir3文档 · LAYABOX [ 60%]

...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

8. 预制体 · LayaAir3.4 · 引擎文档 · LAYABOX [ 60%]

...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

9. 引用外部脚本的方式 · LayaAir3.4 · 引擎文档 · LAYABOX [ 58%]

...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

10. vivo小游戏 · LayaAir3.4 · 引擎文档 · LAYABOX [ 56%]

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

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