大约有 315 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0052 秒)
Laya3.0_api(79) Laya_社区(75) Laya2.0_api(68) laya_api(61) Laya3.0_文档(17) Laya2.0_文档(14) Laya2.0_示例(1)
...回调函数,例如 //根据索引的不同,返回不同的资源URL string function getListItemResource(index:number) { let msg = _messages[index]; if (msg.fromMe) return "url1.lh"; else return "url2.lh"; } 然后设置这个函数为列表的item提供者: aList.itemProvider = getListItemRes...
来源: Laya3.0_文档 发布时间: 20251128
....text.BitmapFontUI { //给自己注册的字体起个名 private fontName: string = "diyFont"; constructor() {super();} onAwake(): void { //加载位位图字体 this.loadBitmapFont(); } /** * 实例化位图字体类,并加载位图字体 */ loadBitmapFont(): void { let bitmapFont: Laya.BitmapFon...
来源: Laya2.0_文档 发布时间: 20210715
...识ID,通常用于识别。 */ __getset(0,__proto,'id',function(){ return String(this._$1__id); }); 158*****700 • 2022-03-24 19:53 目前我们先用这种方案调整,看后续游戏运行情况吧 158*****700 • 2022-03-24 15:40 1.8.1的版本 158*****700 • 2022-03-24 15:41 示例的附件...
来源: Laya_社区 发布时间: 20220323
...声音进行控制,以及获取声音信息。 */ static playSound(url: string, loops?: number, soundClass?: any, startTime?: number) { return new Promise((resolve, reject) => { let soundChannel: Laya.SoundChannel = Laya.SoundManager.playSound(url, loops, Laya.Handler.create(this, () => { re...
来源: Laya_社区 发布时间: 20180124
...量。 * @param name 名字。 */ constructor(maxCount: number = 2, name: string = null) { super(name); this._render = this.addComponent(PixelLineRenderer); this._geometryFilter = (this._render as PixelLineRenderer)._pixelLineFilter; (this._render as PixelLineRenderer).maxLineCount = maxCount; let m...
来源: Laya3.0_文档 发布时间: 20251010
... private mDecorate:Decorate;//装饰器 private mHost: string; private mPort: number; private mConnected: boolean; /** 开启*/ public static OPEN: string = "open"; /** 关闭*/ public static CLOSE: string = ...
来源: Laya_社区 发布时间: 20161109
...} /** * 当报错时打印错误 * @param err 报错信息 */ onError(err: string): void { console.log("加载失败: " + err); } /** * 加载时侦听 */ onLoading(progress: number): void { //接近完成加载时,让显示进度比实际进度慢一点,这是为打开场景时的自动加载...
来源: Laya3.0_文档 发布时间: 20241014
...} /** * 当报错时打印错误 * @param err 报错信息 */ onError(err: string): void { console.log("加载失败: " + err); } /** * 加载时侦听 */ onLoading(progress: number): void { //接近完成加载时,让显示进度比实际进度慢一点,这是为打开场景时的自动加载...
来源: Laya3.0_文档 发布时间: 20251105
...需要暴露,上面就都需要加上@property()。 @property( { type : String } ) public text: string = ""; constructor() { super(); } } 5、Runtime的使用差异 3.0的场景与2.0完全不是一个概念, 3.0的runtime只能在场景上的2D根节点Scene2D或预制体的根节点上设置...
来源: Laya3.0_文档 发布时间: 20251010
...录 this.redHotStatus.splice(showRedHot, 1); // console.log("11111", JSON.stringify(this.redHotStatus)); } this.refreshList.refresh(); } onClickDel(index){ console.log("((((((((((((del------------"); //按索引删除 this.refreshList.array.splice(index, 1); //清除已纪录的打开状态 // this....
来源: Laya2.0_示例 发布时间: 20251130