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

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

1. UI运行时 · LayaAir3.0文档 · LAYABOX [ 100%]

...接使用this.即可使用。例如下面的代码: onAwake(): void { // Button添加鼠标事件,让Image不显示 this.Button.on( Laya.Event.MOUSE_DOWN, this, ()=>{ this.Image.visible = false; }); } 运行此场景来看看效果,如动图2-7所示。 (动图2-7) UI组件脚本就已...

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

2. 场景管理 · LayaAir3.0文档 · LAYABOX [ 85%]

...lass() export class NewScript extends Laya.Script { @property({ type: Laya.Button }) public uiBtn: Laya.Button; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { this.uiBtn.on(Laya.Event.CLICK, th...

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

3. 插件开发说明 · LayaAir3.0文档 · LAYABOX [ 77%]

...Color; /** * 编辑器默认的文字颜色 */ textColor: gui.Color; createButton(autoSize?: boolean): gui.Button; createIconButton(flat?: boolean): gui.Button; createCheckbox(autoSize?: boolean): gui.Button; createIconCheckbox(flat?: boolean): gui.Button; createRadio(): gui.Button; createComboBox()...

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

4. 事件管理 · LayaAir3.0文档 · LAYABOX [ 76%]

...送者发送事件给它的侦听者。那么比如上面示例代码中的Button就是继承自Laya.EventDispatcher,可以用.on的方法来侦听CLICK`事件。 Laya.EventDispatcher 具有如下功能: 2.2.1 事件派发 event /** * 派发事件。 * @param type 事件类型。 * @param data ...

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

5. 多选框组件 · LayaAir3.0文档 · LAYABOX [ 76%]

...heckBox多选框组件(CheckBox) CheckBox是多选框组件,继承自Button。它由两部分组成,选择状态框及内容说明标签。其中选择状态框是图片资源,内容说明标签文本。CheckBox组件的属性接口介绍请参考CheckBox API。 一、通过LayaAir IDE...

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

6. 实体组件系统 · LayaAir3.0文档 · LAYABOX [ 71%]

... ) //拿到 Label 组件 private label: Laya.Label; @property( { type:Laya.Button } ) //拿到 Button 组件 private button: Laya.Button; @property( { type:Laya.Sprite } ) //拿到 Sprite 组件 private sprite: Laya.Sprite; @property( { type:Laya.Animation } ) //拿到 Animation 组件 private anmat...

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