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

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

131. 视频节点 · LayaAir3.3 · 引擎文档 · LAYABOX [ 60%]

...标点击触发播放 Laya.stage.on(Laya.Event.MOUSE_DOWN, () => { Laya.loader.load("resources/layaAir.mp4").then(() => { this.video.play(); //播放视频 }); }) } } 如果是在LayaAir IDE中运行,则VideoNode无需通过事件触发播放。但是在Chrome中,自动播放只允许静...

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

132. 透明区域点击问题 [ 60%]

...域点击问题 var sprite0 = new Sprite(); sprite0.graphics.drawTexture(Loader.getRes("comp/image.png")); sprite0.pos(10, 10); sprite0.mouseEnabled = true; sprite0.name = 'sprite0'; Laya.stage.addChild(sprite0); sprite0.on(Event.CLICK, this, handler_click); 怎么让sp透明区域不可点,有像...

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

133. Laya IDE横竖屏切换时,不断刷新 [ 60%]

...a.stage.scaleMode = 'exactfit'; Laya.stage.screenMode = 'horizontal'; Laya.loader.load(['res/atlas/view.atlas'], Handler.create(this, initGame)); Laya.timer.frameOnce(1, this, function () { Laya.stage.on(Event.RESIZE, this, function () { window.location.reload(); }) }) 2018-04-16 添加评论 免费...

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

134. 限制区域拖动效果,为什么会无法限制呢? [ 59%]

...ad), Laya.ResourceVersion.FILENAME_VERSION);  function beginLoad() { Laya.loader.load("res/atlas/comp.atlas", Handler.create(null, onLoaded)); }  function onLoaded() { Laya.stage.addChild(new GolfMainUI()); }   附件 : --> 2018-06-27 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...

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

135. [LayaAirIDE3]xcode切入切出声音不播放 [ 59%]

... string): void {         Laya.SoundManager.stopAll();         Laya.loader.clearRes(currentBgmUrl);          Laya.loader.load([{ url: currentBgmUrl, type: Laya.Loader.SOUND }],             Laya.Handler.create(this, () => {                 console.log("----playMusic111 ...

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

136. sprite添加texture后,sprite无法触发点击事件? [ 59%]

...,sprite无法触发点击事件? this.item.graphics.drawTexture(Laya.loader.getRes(IMG_RES[this.name])); Laya.stage.addChild(this.item);  this.item.on(Laya.Event.CLICK, this, () => { this.item.destroy(); }); 2017-08-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关...

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

137. GlowFilter和TimeLine/Tween一起用的问题 [ 59%]

... Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628";   Laya.loader.load(apePath, Handler.create(this, setup)); })();   function setup() { createApe(); applayFilter(); }   function createApe() { ape = new Sprite(); ape.loadImage(apePath);   var texture = Laya.loader.getRes(apePath);...

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

138. 动画-旧版骨骼动画 [ 58%]

...SkinAnimation(spirit3D._childs[i], index); } private loadUI(): void { Laya.loader.load(["../../res/threeDimen/ui/button.png"], Laya.Handler.create(this, function (): void { this.changeActionButton = Laya.stage.addChild(new Laya.Button("../../res/threeDimen/ui/button.png", "切换动作")) as Laya.Bu...

来源: Laya_示例 发布时间: 20251130

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

...载Spine动画数据资源(json文件),注意一定要设置为Laya.Loader.SPINE类型,否则不会把json认为是SPINE资源 Laya.loader.load("girl2/mix-and-match-pro.json", Laya.Loader.SPINE).then(() => { // 添加Spine渲染器组件到精灵节点上 this.spine = this.owner.addCompon...

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

140. 两个小问题 [ 58%]

...则销毁子节点,否则不销毁子节点。 资源需要自己用Laya.loader.clearRes清理。 建议:如果只是关闭界面的话直接用removeSelf()从显示列表中移除即可。这个界面彻底不用的话再用destroy销毁。(销毁之后想再次使用的话需要重新实例...

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