大约有 8 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0044 秒)
...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_文档 发布时间: 20251010
... ) //拿到 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_文档 发布时间: 20251010
...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_文档 发布时间: 20251010
...打开 触摸滚动效果。 Off 关闭 触摸滚动效果。 Touch Effect Button 如果勾选了Touch Effect,可以选择对哪个鼠标键生效。 Page Mode 页面模式。以视口大小为页面大小,每次滚动的距离是一页。一般在移动平台上使用,PC上较少,拖动滚...
来源: Laya3.0_文档 发布时间: 20251010
...送者发送事件给它的侦听者。那么比如上面示例代码中的Button就是继承自Laya.EventDispatcher,可以用.on的方法来侦听CLICK`事件。 Laya.EventDispatcher 具有如下功能: 2.2.1 事件派发 event /** * 派发事件。 * @param type 事件类型。 * @param data ...
来源: Laya3.0_文档 发布时间: 20251010
...lass() export class NewScript extends Laya.Script { @property({ type: Laya.Button, caption: "切换按钮" }) public btn: Laya.Button; spine: Laya.Spine2DRenderNode; //外部皮肤 weaponSkin: Laya.ExternalSkin = new Laya.ExternalSkin(); //外部皮肤列表项 weaponSkinItem: Laya.ExternalSkinItem ...
来源: Laya3.0_文档 发布时间: 20251128
...用于模拟游戏过程中玩家产生的数据,例如游戏得分。 Button:按钮,用于控制开放数据域是否显示。 OpenDataContext:开放数据域节点。 2.添加脚本 在TextInput和Button这两个节点上添加脚本,脚本的内容和用途如下所示: TextInput脚...
来源: Laya3.0_文档 发布时间: 20251010
...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_文档 发布时间: 20251010