大约有 10 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0038 秒)
...e DIALOG_WIDTH: number = 220; private DIALOG_HEIGHT: number = 275; private CLOSE_BTN_WIDTH: number = 43; private CLOSE_BTN_PADDING: number = 5; private assets: any[]; private dialog: Laya.Dialog; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完...
来源: Laya3.0_文档 发布时间: 20230303
...特有属性如下: (图1-2) 属性 功能 自动销毁 autoDestoryAtClosed 弹窗视图被关闭后,是否自动销毁(销毁节点和使用到的资源),默认为false,此属性由场景类继承而来。 拖动区域 dragArea 拖动区域(格式:x,y,width,height),默认值...
来源: Laya3.0_文档 发布时间: 20251024
...理一、IDE中的场景1.1 新建场景1.2 场景划分1.3 autoDestroyAtClosed属性1.4 mouseThrough属性二、代码中使用2.1 场景类2.2 打开场景2.3 关闭场景2.4 场景的加载页面2.5 销毁和垃圾回收场景的管理 LayaAir3.0继续延用2.0开发思路为组件化,脚本化...
来源: Laya3.0_文档 发布时间: 20251010
...触发。 Event.MESSAGE:收到服务器发送的数据时触发。 Event.CLOSE:连接关闭时触发。 Event.ERROR:连接出错时触发。 示例代码: // 注册事件监听示例 this.socket.on(Laya.Event.OPEN, this, this.onSocketOpen); this.socket.on(Laya.Event.MESSAGE, this, this.onMes...
来源: Laya3.0_文档 发布时间: 20251010
...enum class LogLevel { Debug = 5, Info = 4, Warn = 3, Error = 2, Fatal = 1, Close = 0, }; 在js脚本中,开发者可以通过以下函数设置日志级别,默认值为5: if( window.conch ) { //值为0:表示关闭所有日志输出 //值为1:表示只有Fatal日志输出 //值为2:表示...
来源: Laya3.0_文档 发布时间: 20251010
... this.handleServerResponse(buffer); }; // 连接关闭处理 this.socket.onclose = () => { console.log("WebSocket closed"); }; // 连接错误处理 this.socket.onerror = (error) => { console.error("WebSocket error:", error); }; } private handleServerResponse(buffer: Uint8Array) { // 尝试解...
来源: Laya3.0_文档 发布时间: 20251010
...aya.events.Event")]*/ /** * 连接被关闭后调度。 * @eventType Event.CLOSE * */ /*[Event(name = "close", type = "laya.events.Event")]*/ /** * 出现异常后调度。 * @eventType Event.ERROR * */ /*[Event(name = "error", type = "laya.events.Event")]*/ 3.1.5 在代码中怎么使用 我们举...
来源: Laya3.0_文档 发布时间: 20250104
...件的内容,返回一个ArrayBuffer */ readFile(id:number):ArrayBuffer; close():void; readAsTextByName(name:string):string; readAsArrayBufferByName(name:string):ArrayBuffer; new ():ZipFile; } declare var ZipFile:ZipFile; 手动更新dcc缓存的功能。 interface AppCache{ ... delAllCache():void...
来源: Laya3.0_文档 发布时间: 20251010
....Handler.create(this, this.onLoading)); //关闭指定的场景 Laya.Scene.close("scene/Login.ls") //销毁指定的场景 Laya.Scene.destroy("scene/Login.ls") 8.2 场景资源加载 示例代码如下: //用Laya.Scene3D的方式加载 Laya.Scene3D.load('scene/Game.ls', Laya.Handler.create(null, f...
来源: Laya3.0_文档 发布时间: 20251010
...ayout.updateViewPort(data.box); draw(POWERRANK); } else if (data.type === 'close') { Layout.clear(); } /** * keyList: 要获取的 key 列表,这个key就是在KVData中设置的key * success:接口调用成功的回调函数 * fail:接口调用失败的回调函数 * complete:接口调用...
来源: Laya3.0_文档 发布时间: 20251010