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

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

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. socket大型项目回调 [ 92%]

...; private _package:IPackage; private _message:IMessage; constructor(){ if(!console.group){ console.group = console.log; console.groupEnd = function(){console.log("----")}; console.info = console.log; console.warn = console.log; console.error = console.log; } this._message = new Message(); this._pack...

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

3. 关于网络监听 · LayaAir3.4 · 引擎文档 · LAYABOX [ 88%]

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

4. 通过laya设计模式制作的,要怎么给按钮绑定事件呢? [ 87%]

...dChild(new TabUI()) this.getGold.on(Laya.Event.MOUSE_DOWN,this,function(){ console.log("点击事件") }) // console.log(this.getGold) } } new Main() Laya_Aaron • 2017-12-13 17:09 getGold 哪定义的呢 xdkaka • 2017-12-13 17:17 上面图片截图了,是在UI编辑模式下 -公用-...

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

5. 组件脚本的内置方法 · LayaAir3.4 · 引擎文档 · LAYABOX [ 84%]

...wake不同的是即使节点未激活onAdded也会调用 onAdded(): void { console.log("Game onAdded"); } //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { console.log("Game onAwake"); } //组件被启用后执行,比如节点...

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

6. 定时器 · LayaAir3.4 · 引擎文档 · LAYABOX [ 80%]

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

7. Laya2自动同步cullingMask方案以及灯光裁剪补丁 [ 77%]

...yer = this._layerMap[layerStr]; if(layer === null || layer === undefined){ console.log(layerNodeName + ' don not match the rule of layer node.'); return; } if(bRemove){ this.removeLayer(target,layer); } else{ this.addLayer(target,layer); } } } } public static removeAllLayers(target) { target.culling...

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

8. 安装layaair2-cmd一直失败 [ 75%]

...:\COCOS\cocos2d-x-3.17.2\templates;E:\COCOS\cocos2d-x-3.17.2\tools\cocos2d-console\bin;E:\COCOS\Python\Python27;E:\COCOS\apache-ant-1.10.7\bin;C:\Users\Administrator\AppData\Roaming\npm;C:\Users\Administrator\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files (x86)\Egret\Egret Wing 3\bin ...

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

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

...注册 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.4 · 引擎文档 · LAYABOX [ 74%]

...e { private _animator: Laya.Animator; private _isRun: boolean; onAwake() { console.log("Game start"); //加载指定的模型预制体,并添加到Scene3D场景内 Laya.loader.load("girl/girl.lh").then(res => { let girl : Laya.Sprite3D = res.create(); this.scene3D.addChild(girl); //获得Animat...

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