大约有 11 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0065 秒)
...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
...og(`成功添加 ${successCount} 个纹理`); const urls = [ "resources/ui/button.png", "resources/ui/panel.png", "resources/ui/icon.png" ]; Laya.loader.load(urls).then(() => { atlasManager.addTexturesByUrl(urls); }); 2.3 移除纹理 移除指定纹理 //接口 removeTexture(textureId: number, l...
来源: Laya3.0_文档 发布时间: 20260131
...实现不同启动入口的需求。 (图1-6) 插件代码如下: //PlayButton.ts class PlayButton { @IEditor.onLoad addPackButton() { //添加运行预览的播放按钮 let playControls = gui.GRoot.inst.getChildByPath("MainView.topButtons.playControlls.Box"); let btn = playControls.getChild("pac...
来源: Laya3.0_文档 发布时间: 20251216
...送者发送事件给它的侦听者。那么比如上面示例代码中的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_文档 发布时间: 20260131
...用于模拟游戏过程中玩家产生的数据,例如游戏得分。 Button:按钮,用于控制开放数据域是否显示。 OpenDataContext:开放数据域节点。 2.添加脚本 在TextInput和Button这两个节点上添加脚本,脚本的内容和用途如下所示: TextInput脚...
来源: Laya3.0_文档 发布时间: 20251010
...约束 | |---|---|---| | 字段不存在 | classic | 仅用经典 UI(Box/Button/Label 等) | | `"both"` | both | 两套均可,同模块保持一致 | | `"ui2"` | new | 仅用新 UI (GBox/GButton/GLabel 等) | --- ## 物理引擎识别 读取 `settings/PlayerSettings.json` 判断物理引擎:...
来源: Laya3.0_文档 发布时间: 20260128