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

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

2331. 我就问一下一个遮罩的问题 [ 69%]

...nst img:Laya.Image = new Laya.Image() img.skin = 'xxxx' // 图片url路径 this.addChild(img) const imgMask:Laya.Sprite = new Laya.Sprite() img.mask = imgMask   我就问一下,这个时候img是能显示还是不能显示?   答案是,如果Laya.init就不会显示;Laya3D.init就会显示...

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

2332. 分享:关于自定义场景继承的实现 [ 69%]

...类是场景类'); } } } 导出UI 导出后layaMaxUI.ts的内容如下/**This class is automatically generated by LayaAirIDE, please do not make any modifications. */ import View=Laya.View; import Dialog=Laya.Dialog; import Scene=Laya.Scene; import {base} from "../script/base/BaseScene"; import Base...

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

2333. TimeLine标签删除失败,动效还是在播放 [ 69%]

...然后重置 就ok了 小丶kiss • 2018-12-19 21:31 结束动画 1)隐藏this.target.visible = false; 2)重置this.timeLine.reset();

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

2334. [LayaAir3]VideoNode代码动态设置视频路径,Weg平台在手机上会自动播放, [ 69%]

...在手机上会自动播放,    // 2. 设置循环属性         this.mediaPlayer.loop = loop;          // 3. 检查文件路径         const videoPath = "resources/Media/" + mediaName;          // 4. 设置视频源         this.mediaPlayer.source = videoPath;   我没...

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

2335. Laya场景编辑时加入的Graphics组件,代码中该如何获取? [ 69%]

...通过类似的代码来声明、获取: private backBtn: Laya.Button; this.backBtn = this.scene.getChildByName('backBtn') as Laya.Button;但这个Rect就不知道是什么类型的了,试了下Laya.Rect/Laya.Graphics.Rect之类的,都没有这个类。     附件 : --> 2019-10-22 1 条评...

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

2336. Tween x和scaleX或是y和scaleY的顺序问题导致执行问题 [ 69%]

... x和scaleX或是y和scaleY的顺序问题导致执行问题 Laya.Tween.to(this, { scaleY: 0.6, y: y }, 100);//这个正常执行Laya.Tween.to(this, { y: y ,scaleY:0.6}, 100);//这样就只执行scaleY了,这是什么情况,x也是这样 2018-09-05 添加评论 免费帖 --> 分享 微博 QZON...

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

2337. ogg格式的音效资源怎样加载 [ 69%]

ogg格式的音效资源怎样加载 this.resUrlArr.push({url:"res/music/1_Pass0.ogg",type:Laya.Loader.SOUND}); this.resUrlArr.push({url:"res/music/1_Pass1.ogg",type:Laya.Loader.SOUND});现在这样写现在pc端没有问题,网页的话加载不了 2017-04-11 添加评论 免费帖 --> 分享 ...

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

2338. 请问有没有方法能够获取“鼠标是否处于按下状态”? [ 69%]

...听 move事件的话! onMouseDown  中 Laya.stage.on(Event.MOUSE_MOVE, this, onMouseMove); onMouseUp  中   Laya.stage.off(Event.MOUSE_MOVE, this, onMouseMove); 也可以写个变量  ,down的时候为true,否则为false  如"cuixueying"  回答的一样! 2017-04-21 3 0 分享 微博 ...

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

2339. 背景音乐来回切换问题 [ 69%]

....core.js文件,找到11230行的判断进行修改,如下所示: if (this.url==SoundManager._tMusic){ AudioSound._initMusicAudio(); tAd=AudioSound._musicAudio; //添加下面这一行代码 tAd.src = this.url; }   2017-07-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到...

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

2340. HTMLIframeElement加载html网页的问题 [ 69%]

....load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Handler.create(this, this.onLoaded)); function onLoaded(): void { //实例UI界面 var testUI: TestUI = new TestUI(); Laya.stage.addChild(testUI); }运行会报错:见图:   求解~!   附件 : --> TestHtml.zip 2017-10-11 添加评...

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