大约有 486 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0047 秒)
...ring ="http://layabox.com/"; qrcode.makeCode(url); Laya.stage.once("click",this,clickHandler); qrcodeSp = new Sprite(); Laya.stage.addChild(qrcodeSp); } private function clickHandler():void { var url:String = qrcode._oDrawing._elImage.src;//获取,注意这里是异步的,开发者可以加个...
来源: Laya2.0_文档 发布时间: 20210715
...enderNode.PAUSED 简单分析一下,_update 里调用了 stop(),将this._currentPlayTime = 0; 但是紧接着后面又将 this._currentPlayTime = state.getCurrentPlayTime(this.trackIndex); 此时 this._currentPlayTime 为非零,结果就是 if (this._currentPlayTime) return Spine2DRende...
来源: Laya_社区 发布时间: 20241202
...。 代码很简单,附件为复现工程,具体代码在GameUiTest.js this.imaAudioLocal.on(Laya.Event.CLICK, this, ()=>{ let resUrl = "res/audio/sound_click.wav"; Laya.SoundManager.playSound(resUrl, 1); }); this.imaAudioNet.on(Laya.Event.CLICK, this, ()=>{ let resUrl = "https://具体...
来源: Laya_社区 发布时间: 20200225
...去舞台焦点(切出游戏)的处理 Laya.stage.on(Laya.Event.BLUR, this, () => { _sound.stop(); }); //获得舞台焦点(切回游戏)的处理 Laya.stage.on(Laya.Event.FOCUS, this, () => { _sound.play(0); }); …… ``` ### 六、音乐与音效播放的完整示例 该示例的完整代...
来源: Laya2.0_文档 发布时间: 20210715
..._update (laya.core.js:21262) 相关逻辑代码如下: moveSuccess(){ this.owner.removeSelf(); Laya.Pool.recover("flyCat", this.owner) } onTriggerEnter(other: any, self: any, contact: any): void { if (other.label === "cloud") { Laya.Tween.clearAll(this._sp) let effect: Laya.Animation = Laya.Poo...
来源: Laya_社区 发布时间: 20191019
...成的监听是怎样写? let fly = Laya.Pool.getItemByCreateFun("fly", this.fly, this); owner.addChild(fly); fly.play(0, true, "ani1"); fly() { let ani = new Laya.Animation(); ani.loadAnimation("plaen4.ani"); return ani; } 这样写是可以正常播放,但是会有这个警告 ani not fo...
来源: Laya_社区 发布时间: 20181105
...nd { //声明一个信息文本 private txtInfo: Text; constructor() { this.setup(); } private setup(): void { var gap: number = 10; //创建一个Sprite充当音效播放按钮 var soundButton: Sprite = this.createButton("播放音效"); soundButton.x = (Laya.stage.width - soundButton.width...
来源: Laya_社区 发布时间: 20190421
...个prefab是带时间轴动画的,绑定了脚本,实例化出来后 this.owner如何播放动画啊? var prefabInstantce=this.owner as Laya.Animation; prefabInstantce.play("aniRota") 我就是想直接播放自身的动画而已 2019-06-16 添加评论 免费帖 --> 分享 微博 QZO...
来源: Laya_社区 发布时间: 20190616
...a(video); hls.on(HLS.Events.MEDIA_ATTACHED, () => { video.muted = true; this.playVideo(); }); hls.on(HLS.Events.ERROR, (event, data) => { console.log("HLS加载失败"); }); hlsxx = hls;//方便销毁用hlsxx.destroy(); }else if(videoTexture.canPlayType("m3u8")){ this.playVideo(); videoTexture...
来源: Laya_社区 发布时间: 20250908
...态 ani.play("attack"); //等待动画播放完成 Laya.timer.frameLoop(1,this,function():void{ //如果当前播放state已经播放完了一次 if(ani.getCurrentAnimatorPlayState().normalizedTime >= 1){ //回到站立状态 ani.play("stand"); } }); } ``` (图6)
来源: Laya2.0_文档 发布时间: 20210715