• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 1,081 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0086 秒)

1031. laya.ui.Button_API3.0 [ 37%]

...andler.create(this,loadComplete));//加载资源 function loadComplete() { console.log("资源加载完成!"); var button = new laya.ui.Button("resource/ui/button.png","label");//创建一个 Button 类的实例对象 button ,传入它的皮肤skin和标签label。 button.x =100;//设置 button ...

来源: Laya3.0_api 发布时间: 20231115

1032. laya.ui.CheckBox_API3.0 [ 37%]

...andler.create(this,loadComplete));//加载资源 function loadComplete() { console.log("资源加载完成!"); var checkBox:laya.ui.CheckBox= new laya.ui.CheckBox("resource/ui/check.png", "这个是一个CheckBox组件。");//创建一个 CheckBox 类的类的实例对象 checkBox ,传入它的皮...

来源: Laya3.0_api 发布时间: 20231115

1033. Laya2自动同步cullingMask方案以及灯光裁剪补丁 [ 36%]

...yer = this._layerMap[layerStr]; if(layer === null || layer === undefined){ console.log(layerNodeName + ' don not match the rule of layer node.'); return; } if(bRemove){ this.removeLayer(target,layer); } else{ this.addLayer(target,layer); } } } } public static removeAllLayers(target) { target.culling...

来源: Laya_社区 发布时间: 20200110

1034. 单选框组容器组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 35%]

...r.addChild(rg); return rg; } private onSelectChange(index: number): void { console.log("你选择了第 " + (index + 1) + " 项"); } } 效果如图所示: (图3-1) Copyright ©Layabox 2026 all right reserved,powered by LayaAir Engine更新时间: 2025-10-16 18:53:02 img{cursor:pointer}

来源: Laya3.0_文档 发布时间: 20251016

1035. 列表组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 35%]

... { cell.setImg(cell.dataSource); } private onSelect(index: number): void { console.log("当前选择的索引:" + index); } } class Item extends Laya.Box { static WID: number = 373; static HEI: number = 85; private img: Laya.Image; constructor() { super(); this.size(Item.WID, Item.HEI); this.img =...

来源: Laya3.0_文档 发布时间: 20251010

1036. 对象池 · LayaAir3.4 · 引擎文档 · LAYABOX [ 34%]

...Laya.Pool.getPoolBySign("Bullet"); // 查看当前对象池内对象数量 console.log( bulletPool.length ); if( bulletPool.length == 0 ) { // 把子弹放入对象池 pool.push( new Bullet() ); } 2.2 清理一个对象池 /** * 清除对象池的对象。 * @param sign 对象类型标识字符。 *...

来源: Laya3.0_文档 发布时间: 20251010

1037. 2.12.2beta1 诸多bug [ 34%]

.../span>"; ele.on(Laya.Event.LINK, this, (event: Laya.Event) => { console.log(event); }); Laya.stage.addChild(ele); zyy • 2021-11-09 13:51 @Laya_Fred: 这段代码 很简单 只是点击 输出 event 如果 把Laya.stage.y 向下调整 就会导致它点击区域错误 zyy • 2021-11-09 ...

来源: Laya_社区 发布时间: 20211105

1038. HttpRequest详解(JavaScript-LayaAir基础篇(JS)-数据与通信) [ 34%]

... xhr.send("res/data.data","","get","text"); function processHandler(data){ console.log(data); } function errorHandler(data){ } function completeHandler(e){ } ``` 上面这个示例我们发送了一个简单的请求,方式是get方式。用来获取一个远端的文件,格式为文本的格式...

来源: Laya2.0_文档 发布时间: 20210714

1039. 按钮组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 34%]

.../ this.COLUMNS | 0) * this.VERTICAL_SPACING + this.yOffset; btn.pos(x, y); console.log(x, y); } } private createButton(skin: string): Laya.Button { var btn: Laya.Button = new Laya.Button(skin); this.owner.addChild(btn); return btn; } } 上述代码运行效果如动图2-1所示: (动图2-1) Copyri...

来源: Laya3.0_文档 发布时间: 20251010

1040. TiledMap加载报错 relativePath为空 [ 34%]

...e(0,0,800, 800),Handler.create(this,onMapLoaded)); function onMapLoaded(){ console.log("地图加载完成"); }scence1.json { "height":25, "infinite":false, "layers":[ { "data":[7, 7, 7, 7, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 1, 1, 7, 7, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,...

来源: Laya_社区 发布时间: 20180326