大约有 212 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0047 秒)
Laya_社区(127) Laya3.0_api(22) Laya3.0_文档(17) Laya2.0_文档(16) Laya_示例(12) Laya2.0_示例(12) laya_api(3) Laya2.0_api(3)
...标点击触发播放 Laya.stage.on(Laya.Event.MOUSE_DOWN, () => { Laya.loader.load("resources/layaAir.mp4").then(() => { this.video.play(); //播放视频 }); }) } } 如果是在LayaAir IDE中运行,则VideoNode无需通过事件触发播放。但是在Chrome中,自动播放只允许静...
来源: Laya3.0_文档 发布时间: 20251010
...域点击问题 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
...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
...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
... 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
...,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
... 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
...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
...载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
...则销毁子节点,否则不销毁子节点。 资源需要自己用Laya.loader.clearRes清理。 建议:如果只是关闭界面的话直接用removeSelf()从显示列表中移除即可。这个界面彻底不用的话再用destroy销毁。(销毁之后想再次使用的话需要重新实例...
来源: Laya_社区 发布时间: 20170914