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

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

61. 音频 · LayaAir3.3 · 引擎文档 · LAYABOX [ 78%]

...去舞台焦点(切出游戏)的处理 Laya.stage.on(Laya.Event.BLUR, this, () => { _sound.stop(); }); //获得舞台焦点(切回游戏)的处理 Laya.stage.on(Laya.Event.FOCUS, this, () => { _sound.play(0); }); …… Copyright ©Layabox 2025 all right reserved,powered by LayaAir E...

来源: Laya3.0_文档 发布时间: 20251010

62. Laya.MovieClip() new的时候崩溃了,在线等,很急!!!! [ 78%]

...现的这是代码 //swf动画 createSWFAnimoton(strSWF,strImg,state):any{ this.swfAni = new Laya.MovieClip(); this.swfAni.load(strSWF,true,strImg); this.swfAni.x = (Laya.stage.width -1900) / 2; this.swfAni.y = (Laya.stage.height - 1200) / 2; this.swfAni.zOrder = 3; this.swfAni.loop = false; this.sw...

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

63. 播放视频只有声音没有图像 [ 77%]

...ginGame extends Laya.Scene { constructor() { super(); LoginGame.instance = this; Laya.MouseManager.multiTouchEnabled = false; this.loadScene("LoginGame.scene"); } onEnable() { SoundManager.playMusic("audio/梅林茂 - 静かな古都.mp3", 0); this.login_game_button.on(Laya.Event.CLICK, this,this.on...

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

64. Skeleton 类播放完成一遍后有没事件或者回调 [ 77%]

...play的第二个参数是true,监听mArmature.player.on(Event.COMPLETE,this,onComplete);即可 如果play的第二个参数是false,监听mArmature.on(Event.STOPPED, this, completeHandler);即可!   2017-08-07 1 0 分享 微博 QZONE 微信 cuixueying 赞同来自: sketon.player.on(Event.COMP...

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

65. Spine渲染器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 77%]

...der.SPINE).then(() => { // 添加Spine渲染器组件到精灵节点上 this.spine = this.owner.addComponent(Laya.Spine2DRenderNode); this.spine.source = "girl2/mix-and-match-pro.json"; // 设置Spine动画数据源 this.spine.skinName = "full-skins/girl"; // 设置皮肤名称 this.spine.play("i...

来源: Laya3.0_文档 发布时间: 20251128

66. Laya.loader.load(xx) 当地址""的时候,会报错。 [ 76%]

... laya 引擎是2.5的      Laya.loader.load(cg_url,Laya.Handler.create(this,()=>{             let tur:Laya.Texture = Laya.loader.getRes(cg_url);             if(tur)img_cg.graphics.drawImage(tur)         }),null,Laya.Loader.IMAGE);    这段代码, 当 cg_...

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

67. 求救 Laya2.0下的Particle2D问题 [ 76%]

...置为true Laya.loader.load('../bin/testflame.part', Laya.Handler.create(this, (setting) => { let frame = new Laya.Particle2D(setting); let key = keyString; let frameX; let frameY; let play = true; let frameScale; let frameRotation; //问题在下面://如果首次传入E/Q,尾焰正常出现...

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

68. 关于微信小游戏音频控制的问题 [ 76%]

...时是直接调用的 Laya.SoundManager.playSound(url, 1, new Laya.Handler(this, this.onComplete)); 但因为很多音效都是属于重复播放,而这个playSound()方法会返回一个SoundChannel,所以我就尝试用了一个dictionary把这些SoundChannel都保存起来,下次播放时如果...

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

69. 龙骨动画播放感觉少了纹理 [ 76%]

...on.scaleX = -1; } bone.addChild(skeleton); skeleton.on(Laya.Event.STOPPED, this, this.playCom, [bone]); skeleton.play(bone.direction, false);     播放方式就和官方的一样  或者说是不是不支持叠加模式啊? 附件 : --> 2017-12-25 添加评论 免费帖 --> 分享 微博 QZONE...

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

70. 3D物体检测到碰撞后,被碰撞物被移除的时候过30秒再次出现?并添加到舞台 [ 76%]

...后删除对方。 PlayerMove.prototype.onTriggerStay = function (other) { this.tsizex = this.box._components[0]._transformOrientedBoundBox.extents.x; this.tsizez = this.box._components[0]._transformOrientedBoundBox.extents.z; this.osizex = other._transformOrientedBoundBox.extents.x; this.osizez = o...

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