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

大约有 114 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0039 秒)

91. 面板容器组件 · LayaAir3.0文档 · LAYABOX [ 46%]

... "atlas/comp/hscroll.png"; panel.size(600, 275); panel.pos(150, 150); this.owner.addChild(panel); // 创建Image组件,作为Panel的子节点 let img: Laya.Image; for (var i: number = 0; i < 4; i++) { // 创建4个Image,水平排列 img = new Laya.Image("atlas/comp/image.png"); img.x = i * 5...

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

92. 两个物体 ,如果在update里修改其中一个物体的rotationEuler,会触发另一个物体的onTriggerEnter回调 [ 45%]

...er(other: Laya.PhysicsComponent) { console.error("onTriggerEnter " + other.owner.name); } }   已上传demo和相关资源.麻烦大佬们帮忙看看,谢谢 附件 : --> Test3DBug.zip 2020-07-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相...

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

93. 单选框组件 · LayaAir3.0文档 · LAYABOX [ 45%]

...io.labelSize = 20; radio.labelBold = true; radio.labelVAlign = "top"; this.owner.addChild(radio); } } 效果如动图2-1所示: (动图2-1) Copyright ©Layabox 2022 all right reserved,powered by LayaAir Engine更新时间: 2023-10-10 10:51:44 img{cursor:pointer}

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

94. 垂直滑动条组件 · LayaAir3.0文档 · LAYABOX [ 44%]

...s.tick = 1; vs.changeHandler = new Laya.Handler(this, this.onChange); this.owner.addChild(vs); } private onChange(value: number): void { console.log("滑块的位置:" + value); } } 运行效果: (动图2-1) Copyright ©Layabox 2022 all right reserved,powered by LayaAir Engine更新时间...

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

95. 水平滑动条组件 · LayaAir3.0文档 · LAYABOX [ 44%]

...s.tick = 1; hs.changeHandler = new Laya.Handler(this, this.onChange); this.owner.addChild(hs); } private onChange(value: number): void { console.log("滑块的位置:" + value); } } 运行效果: (动图2-1) Copyright ©Layabox 2022 all right reserved,powered by LayaAir Engine更新时间...

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

96. 精灵 · LayaAir3.0文档 · LAYABOX [ 44%]

...= Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Sprite }) public sprite1: Laya.Sprite; @property({ type: Laya.Sprite }) public sprite2: Laya.Sprite; constructor() { super(); } /** * 组件被激活后执行,此时所有节点...

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

97. vivo小游戏 · LayaAir3.0文档 · LAYABOX [ 43%]

... } = Laya; @regClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake()...

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

98. 预制体模块 · LayaAir3.0文档 · LAYABOX [ 43%]

...} = Laya; @regClass() export class ScriptA extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type: Laya.Box } ) private box: Laya.Box; constructor() { super(); } onStart(): void { //加载预制体文件 Laya.loader.load("resources/Title.lh").then( (res)=>{ //创建预制体 let...

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

99. 下拉选项框组件 · LayaAir3.0文档 · LAYABOX [ 42%]

...,item3,item4,item5"); ComboBox.labelSize = 30; ComboBox.itemSize = 25 this.owner.addChild(ComboBox); ComboBox.autoSize = true; ComboBox.pos(200, 200); }); } } Copyright ©Layabox 2022 all right reserved,powered by LayaAir Engine更新时间: 2023-10-08 16:38:54 img{cursor:pointer}

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

100. 导航标签组组件 · LayaAir3.0文档 · LAYABOX [ 41%]

...tedIndex); 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 2022 all right re...

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