大约有 75 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0057 秒)
...按钮点击事件 点击后暂停游戏 this.pauseBtn.on(Laya.Event.CLICK, this, this.onPauseBtnClick); // 初始化UI 显示 this.reset(); } ... "Cannot read property 'on' of undefined" "TypeError: Cannot read property 'on' of undefined at new ...
来源: Laya_社区 发布时间: 20171118
...Laya.Script命名函数方式处理输入。例如: this.aNode.on(Laya.Event.CLICK, ()=> { console.log("clicked"); }); class MyScript extends Laya.Script { //脚本事件 onMouseClick(e:Event) { console.log("clicked"); } } aNode.addComponent(MyScript); 以上两种方式是等价的,且在纯...
来源: Laya3.0_文档 发布时间: 20251010
...ton}) public initBtn: Laya.Button; onEnable(): void { this.initBtn.on(Laya.Event.CLICK, this.onInit); } onInit() { alert(extendLib.initializeSteam()); } } 构建发布Windows后,需要在exe的同级目录下,新建一个steam_appid.txt 文件,其中只包含 AppID。 (图2-2) 在Steam客...
来源: Laya3.0_文档 发布时间: 20251010
...ndler otherHandler().then(res => { // 默认进度加1% this._loadScene.event("progress", .01) if (res) param = .concat((param || ), [res]) Laya.Scene.open(url, closeOther, param, complete, progress) }) } /** * 清除loading page */ clearLoadingPage() { this._loadScene = null Laya.Scene.setLoadin...
来源: Laya_社区 发布时间: 20181124
...一个 Sprite 实例。 package { import laya.display.Sprite; import laya.events.Event; public class Sprite_Example { private var sprite:Sprite; private var shape:Sprite public function Sprite_Example() { Laya.init(640, 800);//设置游戏画布宽高、渲染模式。 Laya.stage.bgColor = "#efefef"...
来源: Laya3.0_api 发布时间: 20231115
...nt, url);// 此处最好加延迟 //监听器注册 Laya.Browser.window.addEventListener("click", (event: any) => { console.log(event.type); }) Window.open() 方法、window.postMessage()方法、Window.addEventListener()方法 3.3 container 画布 LayaAir引擎里可以通过 Laya.Browser.contai...
来源: Laya3.0_文档 发布时间: 20251010
...All Classes | Index | Frames No Frames ButtonProperties | Methods | Events Packagelaya.uiClasspublic class ButtonInheritanceButton UIComponent Sprite Node EventDispatcher ObjectImplements ISelectSubclasses CheckBox, Radio Button 组件用来表示常用的多态按钮。 Button 组件可显...
来源: Laya2.0_api 发布时间: 20190513
...ll Classes | Index | Frames No Frames CheckBoxProperties | Methods | Events Packagelaya.uiClasspublic class CheckBoxInheritanceCheckBox Button UIComponent Sprite Node EventDispatcher Object CheckBox 组件显示一个小方框,该方框内可以有选中标记。 CheckBox 组件还可以显...
来源: Laya2.0_api 发布时间: 20190513
... All Classes | Index | Frames No Frames RadioProperties | Methods | Events Packagelaya.uiClasspublic class RadioInheritanceRadio Button UIComponent Sprite Node EventDispatcher Object Radio 控件使用户可在一组互相排斥的选择中做出一种选择。 用户一次只能选择 Radio...
来源: Laya2.0_api 发布时间: 20190513
...ions", inspector: "Buttons", options : { buttons : [ { caption : "点我", event: "my_click" } ] } } ] } ]); this._panel.allowUndo = true; //根据需要设置 //如果不需要undo功能,也可以直接this._data = {}; this._data = IEditor.DataWatcher.watch({}); //inspect可以多次调用,将...
来源: Laya3.0_文档 发布时间: 20251010