大约有 10 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0052 秒)
...= wx.getOpenDataContext(); // 向子域发送消息,开发者可以通过key:value的形式自行定义发送的内容 openDataContext.postMessage({ text: "从主域发送的信息", }); } } 在代码编辑器中打开上一节创建好的开放数据域工程文件,找到index.js文件,在...
来源: Laya3.0_文档 发布时间: 20251010
... { “showStatusBar”: true } ,那么最终的game.json文件里这个key值就会被加入,并且引擎模版里的game.json其他key值会保留。 三、LayaAir适配哪些小游戏平台 LayaAir 3.0当前适配了以下平台: 微信小游戏 抖音小游戏 OPPO小游戏 vivo小游戏 ...
来源: Laya3.0_文档 发布时间: 20251010
...; }); } } 5.2 自定义对象池类 export class Pool { private _poolDic:{[key: string]: any;} = {}; private InPoolSign: string = "__InPool"; constructor() { } private static _instance: Pool = new Pool(); public static getInstance() { return this._instance; } //通过名字找到对应的对象池 g...
来源: Laya3.0_文档 发布时间: 20251010
...; }); } } 5.2 自定义对象池类 export class Pool { private _poolDic:{[key: string]: any;} = {}; private InPoolSign: string = "__InPool"; constructor() { } private static _instance: Pool = new Pool(); public static getInstance() { return this._instance; } //通过名字找到对应的对象池 g...
来源: Laya3.0_文档 发布时间: 20250104
...* @param headers (default = null) HTTP 请求的头部信息。参数形如key-value数组:key是头部的名称,不应该包括空白、冒号或换行;value是头部的值,不应该包括换行。比如["Content-Type", "application/json"]。 */ send(url: string, data?: any, method?: "get" ...
来源: Laya3.0_文档 发布时间: 20251010
...容为 {"showStatusBar": true },那么最终的game.json文件里这个key值就会被加入,并且引擎模版里的game.json其他key值会保留。 在游戏好友排行榜的开发中,发布后的release目录一般不会加入版本管理,这里的openDataContext目录在协同开发中...
来源: Laya3.0_文档 发布时间: 20251010
...ethod); if (handler && handler.method != null) { this._map[handler.key] = null; handler.run(true); } } 使用示例如下: const { regClass } = Laya; import { RuntimeScriptBase } from "./RuntimeScript.generated"; @regClass() export class RuntimeScript extends RuntimeScriptBase { onAwake():...
来源: Laya3.0_文档 发布时间: 20251010
...tends Laya.Script { onAwake(): void { this.loadTexture("resources/image/monkey2.png", 500);//需要在resources/image放入相应的资源 this.loadTexture("https://layaair.com/3.x/demo/resources/res/apes/monkey2.png"); } /**加载并显示图片 */ loadTexture(url: string, x: number = 0, y: number ...
来源: Laya3.0_文档 发布时间: 20251010
...* @param headers (default = null) HTTP 请求的头部信息。参数形如key-value数组:key是头部的名称,不应该包括空白、冒号或换行;value是头部的值,不应该包括换行。比如["Content-Type", "application/json"]。 */ send(url: string, data: any = null, method: "...
来源: Laya3.0_文档 发布时间: 20250104
...名称匹配规则 naming ,IDE会根据naming结果作为搜索材质的 key(键值)对指定的目录进行查找。 限定查找目录就是指定哪个目录中查找,也是有两种方式,如图6-4所示: (图6-4) 图中的两个选项比较容易理解,就是在当前的materials...
来源: Laya3.0_文档 发布时间: 20251010