大约有 16 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0049 秒)
...参考滚动支持 一、 管理列表内容 运行时,可以直接通过addChild/removeChild等API修改列表的孩子。但在实际应用中,列表的内容通常被频繁的更新。典型的用法就是当接收到后台数据时,将列表清空,然后再重新添加所有项目。如...
来源: Laya3.0_文档 发布时间: 20251128
...下面来熟悉一下Node类的所有基础的功能 添加 添加子节点addChild(node:Node) 在不考虑层级的情况下,我们可以给某个节点添加子节点,可让子节点跟随父节点显示与否,移动,以及方便管理。添加的子节点会加到所有子节点的最后...
来源: Laya3.0_文档 发布时间: 20251010
...Laya.stage.height - tree.height) / 2; tree.bgColor = "#d25454"; this.owner.addChild(tree); } } class Item extends Laya.Box { constructor() { super(); this.right = 0; this.left = 0; var selectBox: Laya.Clip = new Laya.Clip("resources/tree/clip_selectBox.png", 1, 2); selectBox.name = "selectBox";//设...
来源: Laya3.0_文档 发布时间: 20251010
...bg.width >> 1, Laya.stage.height - bg.height >> 1); this.owner.addChild(bg); } private createTimerAnimation(): void { this.counter = new Laya.Clip(this.clipSkin, 10, 1); this.counter.autoPlay = true; this.counter.interval = 1000; this.counter.x = (Laya.stage.width - this.counter.width) /...
来源: Laya3.0_文档 发布时间: 20251010
...ex); tab.selectHandler = new Laya.Handler(this, this.onSelect); this.owner.addChild(tab); return tab; } private onSelect(index: number): void { console.log("当前选择的标签页索引为 " + index); } } 运行效果如下动图所示: (动图2-1) Copyright ©Layabox 2025 all right reserved...
来源: Laya3.0_文档 发布时间: 20251010
... list.renderHandler = new Laya.Handler(this, this.updateItem); this.owner.addChild(list); // 设置数据源为对应图片的路径 var data: any[] = []; for (var i: number = 0; i < 10; ++i) { data.push("resources/res/ui/listskins/1.jpg"); data.push("resources/res/ui/listskins/2.jpg"); data.push...
来源: Laya3.0_文档 发布时间: 20251010
...apMode = 2; //播放模式为pingpong播放模式(PINGPONG) this.owner.addChild(Animation) //添加节点 } } 效果如动图3-1所示: (动图3-1) Copyright ©Layabox 2025 all right reserved,powered by LayaAir Engine更新时间: 2025-10-10 16:27:54 img{cursor:pointer}
来源: Laya3.0_文档 发布时间: 20251010
...rg.selectHandler = new Laya.Handler(this, this.onSelectChange); this.owner.addChild(rg); return rg; } private onSelectChange(index: number): void { console.log("你选择了第 " + (index + 1) + " 项"); } } 效果如图所示: (图3-1) Copyright ©Layabox 2025 all right reserved,powered by ...
来源: Laya3.0_文档 发布时间: 20251016
...龙蛇马羊猴鸡狗猪年快乐"; testFontClip.spaceY = 10; this.owner.addChild(clipnum); this.owner.addChild(fontClip); this.owner.addChild(testFontClip); this.owner.addChild(testClipNum); this.owner.addChild(clipnum1); } } 通常FontClip已经可以满足开发者的基本需求。如果有特...
来源: Laya3.0_文档 发布时间: 20251010
...nish(): void { //初始化3D场景 this.scene = (<Scene3D>Laya.stage.addChild(Loader.createNodes("res/threeDimen/scene/TerrainScene/XunLongShi.ls"))); //根据场景中方块生成路径点 this.initPath(this.scene); //获取可行走区域模型 var meshSprite3D: MeshSprite3D = (<MeshSprit...
来源: Laya3.0_文档 发布时间: 20230303