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

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

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 [ 70%]

...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 [ 57%]

... ) //拿到 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_文档 发布时间: 20240809

5. 预制体模块 · LayaAir3.0文档 · LAYABOX [ 55%]

...点修改了width属性(属性设置面板有黄色线提示) 添加了Button组件(有“+”号标识) 这些修改也可以覆盖到预制体中,我们来看看如何操作。如图3-4所示 (图3-4) 点击item节点,在右边的属性面板中,点击 覆盖属性 按钮,可...

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

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

... ) //拿到 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

7. 2.x引擎项目升级指南 · LayaAir3.0文档 · LAYABOX [ 41%]

...N和RIGHT_MOUSE_UP,改为派发MOUSE_DOWN和MOUSE_UP,可以通过Event.button区分鼠标左中右键。 3.5 事件汇总 Laya.Script 里相关的输入处理函数有: /** * 鼠标按下时执行 */ onMouseDown?(evt: Event): void; /** * 鼠标抬起时执行 */ onMouseUp?(evt: Event): void; /...

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

8. 和原生Dom交互 · LayaAir3.0文档 · LAYABOX [ 39%]

...s,this.onUIAssetsLoaded)); } private onUIAssetsLoaded():void{ var btn:Laya.Button = new Laya.Button("res/a.png"); Laya.stage.addChild(btn); //创建隐藏的file并且把它和按钮对齐。达到位置一致,这里我们默认在0点位置 var file:any = Laya.Browser.document.createElement("inpu...

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