大约有 63 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0025 秒)
...据 */ static handleSyncMessage(eventName: string, data: string): string { if (eventName == "syncMessage") { return "sync message from platform"; } return "default sync result"; } /** * 异步事件 * @param eventName 事件名称 * @param data 数据 * @param cb callback */ static async handleAsync...
来源: Laya3.0_文档 发布时间: 20251010
...de + '°, ' + info.latitude + '°),精确度:' + info.accuracy + 'm'); if (info.altitude != null) console.log('海拔:' + info.altitude + 'm' + (info.altitudeAccuracy != null ? (',精确度:' + info.altitudeAccuracy + 'm') : '')); if (info.heading != null && !isNaN(info.heading)) c...
来源: Laya3.0_文档 发布时间: 20251010
...据自己的需求进行修改: window.loadingView = new loadingView(); if(window.loadingView) { window.loadingView.loadingAutoClose=true;//true代表当动画播放完毕,自动进入游戏。false为开发者手动控制 window.loadingView.bgColor("#FFFFFF");//设置背景颜色 window.loading...
来源: Laya3.0_文档 发布时间: 20251010
... // 查看当前对象池内对象数量 console.log( bulletPool.length ); if( bulletPool.length == 0 ) { // 把子弹放入对象池 pool.push( new Bullet() ); } 2.2 清理一个对象池 /** * 清除对象池的对象。 * @param sign 对象类型标识字符。 */ static clearBySign(sign: string)...
来源: Laya3.0_文档 发布时间: 20251010
...初始化, bool SteamManager::Initialize() { // 是否进行过初始化 if (m_bInitialized) { return true; } SteamErrMsg msg; if (SteamAPI_InitEx(&msg) != ESteamAPIInitResult::k_ESteamAPIInitResult_OK) { // Steam初始化失败, 请确保Steam客户端正在运行 return false; } m_bInitializ...
来源: Laya3.0_文档 发布时间: 20251010
...用注册监听函数的方式进行监听网络变化,代码如下: if( conch ) { conch.setNetworkEvtFunction(function(type) { alert(type) }); } 注意: 1、conch只能在LayaNative环境下调用,在网页版本中是没有conch定义的,所以需要判断一下是否存在。 在LayaAir...
来源: Laya3.0_文档 发布时间: 20251010
...; } private updateLightByTime(progress: number): void { let intensity = 0; if (progress < 0.125) { intensity = 0.2; } else if (progress < 0.375) { const t = (progress - 0.125) / 0.25; intensity = 0.2 + t * 0.8; } else if (progress < 0.708) { intensity = 1.0; } else if (progress < 0.833) ...
来源: Laya3.0_文档 发布时间: 20251010
...中,开发者可以通过以下函数设置日志级别,默认值为5: if( window.conch ) { //值为0:表示关闭所有日志输出 //值为1:表示只有Fatal日志输出 //值为2:表示只有Fatal和Error日志输出 //值为n:表示只有LogLevel <= n的日志输出 window.conch....
来源: Laya3.0_文档 发布时间: 20251010
...译为JS: var os = conchConfig.getOS(); var bridge; var obj = {} as any; if (os == "Conch-ios") { bridge = PlatformClass.createClass("JSBridge");//创建脚步代理 } else if (os == "Conch-android") { //需要完整的类路径,注意与iOS的不同 bridge = PlatformClass.createClass("demo.JSBr...
来源: Laya3.0_文档 发布时间: 20250422
...坐标转换为百度坐标 private convertToBaiduCoord(data: any): void { if (data.status == 0) { var position: any = data.points[0]; // 设置标注物位置 this.marker.setPosition(position); this.map.panTo(position); } } 在转换完成后设置标注物的位置,并且把视角平移到以标...
来源: Laya3.0_文档 发布时间: 20251010