• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 486 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0047 秒)

251. LayaAir和原生DOM交互(ActionScript-2D进阶篇(AS3)-扩展模块) [ 66%]

...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

252. [LayaAir3]Laya3.2.2版Spine 3.8,Spine2DRenderNode动画播放完毕后,playState返回不正确 [ 66%]

...enderNode.PAUSED   简单分析一下,_update 里调用了 stop(),将this._currentPlayTime = 0; 但是紧接着后面又将 this._currentPlayTime = state.getCurrentPlayTime(this.trackIndex); 此时 this._currentPlayTime 为非零,结果就是 if (this._currentPlayTime) return Spine2DRende...

来源: Laya_社区 发布时间: 20241202

253. qq小游戏网络音效无法重复播放(有复现demo) [ 66%]

...。 代码很简单,附件为复现工程,具体代码在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

254. 音乐与音效的播放与控制(TypeScript-LayaAir基础篇(TS)-硬件设备相关) [ 66%]

...去舞台焦点(切出游戏)的处理 Laya.stage.on(Laya.Event.BLUR, this, () => { _sound.stop(); }); //获得舞台焦点(切回游戏)的处理 Laya.stage.on(Laya.Event.FOCUS, this, () => { _sound.play(0); }); …… ``` ### 六、音乐与音效播放的完整示例 该示例的完整代...

来源: Laya2.0_文档 发布时间: 20210715

255. box2d引擎报错问题 [ 65%]

..._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

256. 动画加载完成的监听是怎样写? [ 65%]

...成的监听是怎样写? 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

257. 版本号:2.0.2 beta, 在sound文件夹下音乐播放不了,放入到res文件夹下可播放 [ 65%]

...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

258. 如何直播放对象自身的时间轴动画? [ 65%]

...个prefab是带时间轴动画的,绑定了脚本,实例化出来后 this.owner如何播放动画啊?   var prefabInstantce=this.owner as Laya.Animation;   prefabInstantce.play("aniRota")   我就是想直接播放自身的动画而已 2019-06-16 添加评论 免费帖 --> 分享 微博 QZO...

来源: Laya_社区 发布时间: 20190616

259. [LayaAir3]LAYAAIR 3.3 和 LAYANATIVE 的VIDEO 支持 M3U8文件吗? [ 65%]

...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

260. 播放动画(ActionScript-3D基础(AS3)-LayaAir3D之Animator动画) [ 65%]

...态 ani.play("attack"); //等待动画播放完成 Laya.timer.frameLoop(1,this,function():void{ //如果当前播放state已经播放完了一次 if(ani.getCurrentAnimatorPlayState().normalizedTime >= 1){ //回到站立状态 ani.play("stand"); } }); } ``` ![](img/6.gif)(图6)

来源: Laya2.0_文档 发布时间: 20210715