大约有 91 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0043 秒)
...@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
... var n=3; if(window.conch){ window.conch.setOnBackPressedFunction(()=>{ console.log('press back '+n); if(n-- <=0){ window.conch.exit(); } else{ //用户自己的代码,例如返回上层页面 } }); } Copyright ©Layabox 2022 all right reserved,powered by LayaAir Engine更新时间: 2023...
来源: Laya3.0_文档 发布时间: 20230303
...义,代码如下: ```javascript window.onLayaInitError=function(e) { console.log("onLayaInitError error=" + e); alert("加载游戏失败,可能由于您的网络不稳定,请退出重进"); } ``` 开发者可以根据自己需求,修改报错信息和报错方式。 ## 9. 获取设备型...
来源: Laya2.0_文档 发布时间: 20210715
...@IEditorEnv.regClass() class Script { static speak(arg1: any, arg2: any) { console.log(arg1); console.log(arg2); } } 然后打开终端,输入命令LayaAirIDE --project=C:\Users\ASUS\Desktop\LayaProject --script=Script.speak --script-args="say \"hello world\""后,如图2-2所示,可以看到...
来源: Laya3.0_文档 发布时间: 20251010
...10; i++) Laya.timer.callLater(this, this.hideImage); } hideImage(): void { console.log("hideImage"); this.Image.visible = false; } } 5. 清理定时器 Laya.timer.clear:清理指定的定时器。定义如下: /** * 清理定时器。 * @param caller 执行域(this)。 * @param method 定时器...
来源: Laya3.0_文档 发布时间: 20251010
...Start(): void { var nType = (window as any).conch.config.getNetworkType(); console.log("network type: " + nType); } 发布Android项目后,测试使用的网络环境为WiFi环境,因此Android Studio控制台打印的信息为:network type: 1。 Copyright ©Layabox 2026 all right reserved,p...
来源: Laya3.0_文档 发布时间: 20251010
Uncaught Can not find class laya.ani.bone.Skeleton 新建项目 console.log(Laya.Skeleton)为undefine 场景里放入.sk动画 运行报错Can not find class laya.ani.bone.Skeleton 附件 : --> 2020-05-04 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: ...
来源: Laya_社区 发布时间: 20200504
....ts', onwarn:(waring,warn)=>{ if(waring.code == "CIRCULAR_DEPENDENCY"){ console.log("warnning Circular dependency:"); console.log(waring); } }, treeshake: false, //建议忽略 plugins: [ typescript({ [b]cacheRoot:workSpaceDir + "/.rpt2_cache", [/b] tsconfig:workSpaceDir + "/tsconfig.json", check...
来源: Laya_社区 发布时间: 20200607
...port class NewScript extends Main { private ui: RuntimeScript; onStart() { console.log("Game start"); this.ui = this.owner.scene as RuntimeScript; super.baseUI(this.ui); } } import { Main } from "./Main"; import { ButtonRuntime } from "./ButtonRuntime"; const { regClass, property } = Laya; @regClass...
来源: Laya3.0_文档 发布时间: 20251010
...rivate onChangeColor(colorPicker: Laya.ColorPicker, e: any = null): void { console.log(colorPicker.selectedColor); } } 运行效果如下动图所示: (动图2-1) Copyright ©Layabox 2026 all right reserved,powered by LayaAir Engine更新时间: 2025-10-10 16:27:59 img{cursor:pointer}
来源: Laya3.0_文档 发布时间: 20251010