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

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

21. 组件装饰器说明 · LayaAir3.4 · 引擎文档 · LAYABOX [ 54%]

...//把输入的角度值,转成弧度给_radian存起来。 } onStart() { console.log(this._radian); } } 2.4 是否为私有属性(影响面板可见) 除了前文中提到的hidden这个属性标识参数会影响属性在面板上是否可见之外。private参数也会影响属性在面板...

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

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

...就是当前被点击的对象 function onClickItem(item: GObject): void { console.log("点击了对象:" + item.title); //获得这个对象在列表中的索引的方式 let childIndex = list.getChildIndex(item); } 从上面的代码可以看出,事件回调里都可以方便的获得当前点...

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

23. Spine渲染器 · LayaAir3.4 · 引擎文档 · LAYABOX [ 50%]

...currentSkin; this.spine.play("idle", false); //切换后重新播放一次 console.log(`当前皮肤切换至:${currentSkin}`); }); } } 2.6 动画名称 animationName 在前文的示例代码中,我们通过play方法来直接播放动画。为了在IDE面板中更方便易用,我们提供的...

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

24. laya.ui.CheckBox_API3.0 [ 50%]

...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

25. laya.ui.Button_API3.0 [ 50%]

...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

26. 3D物理系统 · LayaAir3.4 · 引擎文档 · LAYABOX [ 49%]

...{ super(); } onTriggerEnter(): void { /* ……省略若干逻辑代码 */ console.log("触发器物理事件onTriggerEnter"); } onTriggerStay(): void { /* ……省略若干逻辑代码 */ console.log("触发器物理事件onTriggerStay"); } onTriggerExit(): void { /* ……省略若干逻辑代码...

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

27. 3D粒子 · LayaAir3.4 · 引擎文档 · LAYABOX [ 49%]

...tring): void { if (this._isInited) { return; } this._filePath = file_path; console.log("Particle3D"); //从拿到的粒子系统克隆一个 var res = Laya.loader.getRes(file_path); var particle = res.clone(); this._particle = particle; //获取这个粒子特效的所有粒子系统,用于后面...

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

28. 3D粒子编辑模块 · LayaAir3文档 · LAYABOX [ 49%]

...tring): void { if (this._isInited) { return; } this._filePath = file_path; console.log("Particle3D"); //从拿到的粒子系统克隆一个 var res = Laya.loader.getRes(file_path); var particle = res.clone(); this._particle = particle; //获取这个粒子特效的所有粒子系统,用于后面...

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

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

...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

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

... { 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