大约有 28 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0024 秒)
...语言、LayaAirIDE让项目开发更高效。let picW = 824, picH = 484, console, shakeCount = 0; class InputDevice_Shake { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya....
来源: Laya2.0_示例 发布时间: 20241117
...nt.ERROR, this, this.onError); } onAssetLoaded(texture) { // 使用texture console.log("加载结束"); } // 加载进度侦听器 onLoading(progress) { console.log("加载进度: " + progress); } onError(err) { console.log("加载失败: " + err); } } new Loader_ProgressAndErrorHandle();module laya...
来源: Laya2.0_示例 发布时间: 20241117
...alue = "item aitem bsomethings..."; this.proessXML(xmlValueContainsError); console.log("\n"); this.proessXML(xmlValue); } // 使用xml proessXML(source) { const Utils = Laya.Utils; let xml; try { xml = Utils.parseXMLFromString(source); } catch (e) { console.log(e.massage); return; } this.printDirect...
来源: Laya2.0_示例 发布时间: 20241117
...is.skeleton.on(Event.STOPPED, this, this.play); this.play(); } onError() { console.log("parse error"); } play() { console.log("1111111111"); if (++this.index >= this.skeleton.getAnimNum()) { this.index = 0; } this.skeleton.play(this.index, false, true); } } new SpineBinary;import Browser = Laya.Brow...
来源: Laya2.0_示例 发布时间: 20241117
...mHei", "#FFFFFF", "center"); return btn; } // 播放音效 onPlaySound() { console.log("播放音效"); Laya.SoundManager.playSound("res/sounds/btn.mp3", 1, new Laya.Handler(this, this.onComplete)); } // 播放音乐 onPlayMusic() { console.log("播放音乐"); Laya.SoundManager.playMusic("res/sound...
来源: Laya2.0_示例 发布时间: 20241117
...is, this.onAssetLoaded), null, null, 2, false); } onAssetLoaded(texture) { console.log(texture.url); // 恢复默认并发加载个数。 if (++numLoaded == 3) { Laya.loader.maxLoader = 5; console.log("All done."); } } } new Loader_Sequence();module laya { import Texture = Laya.Texture; import Handl...
来源: Laya2.0_示例 发布时间: 20241117
...等待响应...\n"; Laya.stage.addChild(logger); } onHttpRequestError(e) { console.log(e); } onHttpRequestProgress(e) { console.log(e); } onHttpRequestComplete(e) { logger.text += "收到数据:" + hr.data; } } new Network_POST();module laya { import Stage = Laya.Stage; import Text = Laya.Text; im...
来源: Laya2.0_示例 发布时间: 20241117
...等待响应...\n"; Laya.stage.addChild(logger); } onHttpRequestError(e) { console.log(e); } onHttpRequestProgress(e) { console.log(e); } onHttpRequestComplete(e) { logger.text += "收到数据:" + hr.data; } } new Network_GET();module laya { import Stage = Laya.Stage; import Text = Laya.Text; imp...
来源: Laya2.0_示例 发布时间: 20241117
...lete); this.timeLine.on(Event.LABEL, this, this.onLabel); } onComplete() { console.log("timeLine complete!!!!"); } onLabel(label) { console.log("LabelName:" + label); } keyDown(e) { const Keyboard = Laya.Keyboard; switch(e.keyCode) { case Keyboard.LEFT: this.timeLine.play("turnLeft"); break; case Ke...
来源: Laya2.0_示例 发布时间: 20241117
...配模式" + "(" + modes[index] + ")"; } onClick(e) { //输出坐标信息 console.log("mouse:", Laya.stage.mouseX, Laya.stage.mouseY); } onResize() { //输出当前适配模式下的stage大小 console.log("size:", Laya.stage.width, Laya.stage.height); } } new SmartScale_T();module laya { import Sp...
来源: Laya2.0_示例 发布时间: 20241117