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

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

231. 按钮交互实现 [ 57%]

...new GameOverUI(); this.SceneMajor.addChild(gameOver); gameOver.btRetry.on('click', this, function(){ window.location.reload(); });当然因为按钮都是小元素, 默认情况下会被打包成atlas文件 需要在代码执行前先下载完毕这个图片集 Laya.loader.create("res/atlas/simbols....

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

232. Laya中使用shader的问题 [ 57%]

...uniform vec4 iMouse; // mouse pixel coords. xy: current (if MLB down), zw: click uniform samplerXX  iChannel0..3; // input channel. XX = 2D/Cube  uniform vec4 iDate; // (year, month, day, time in seconds)   2017-05-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 ...

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

233. 点击区域问题 [ 57%]

.../        btn_bottom[i].hitArea = rect;          btn_bottom[i].on("click", this, bottomClick, [i]);[/i][/i][/i][/i][/i] 不加hitArea时,点击区域在左上方一小块,加了后完全无效   附件 : --> test2.rar 2016-12-02 添加评论 免费帖 --> 分享 微博 QZONE 微信 没...

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

234. 分享:Dragonbones/Spine的换肤操作 [ 57%]

...事件,务必设置好size,也就是鼠标的相应区域 btn.on(Event.CLICK,this,onChangeSkin); Laya.stage.addChild(btn); var text:Text=new Text(); text.text='切换皮肤'; text.fontSize=20; btn.addChild(text); text.pos(35,5); } private function onChangeSkin():void { curNum++; if(curNum%2!=0) ...

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

235. [LayaAir2] 在使用videoDom创建视频元素后iPad跟iPhone中位置不一样 [ 57%]

...eoDom { htmlvideo:Laya.HtmlVideo; constructor() { Laya.stage.on(Laya.Event.CLICK,this,this.onClick); } onClick(){ this.initVideo(); } initVideo() { this.htmlvideo = new Laya.HtmlVideo(); this.htmlvideo.setSource("https://www.layaair.com/3.x/de ... ot%3B,1); this.htmlvideo.video.addEventListener("loa...

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

236. 父元素,子元素,兄弟元素 [ 57%]

...数有阻止点击事件冒泡 点击事件: this.btnHome.on(Laya.Event.CLICK, this, this.homeClick);   private homeClick(e) { //防止点击事件穿透 e.stopPropagation(); } 2018-10-12 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起...

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

237. img点击事件。点击图片外,也触发了事件。请问怎么解决 [ 57%]

...("res/img/m1.jpg",100,100,100,100);   ctn2.addChild(gq); gq.on(Laya.Event.CLICK,this,Is);   }  function Is(){ console.log(1); } 2018-08-06 0 0 分享 微博 QZONE 微信 叔年心~厌世 赞同来自: 点击图片的左上所有区域都触发点击事件?为什么 2018-08-06 0 1 分享 微...

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

238. 对象监听另外一个脚本的执行方法不被执行 [ 57%]

...息按钮监听 this.AllTitleButton.on(Laya.Event.MOUSE_DOWN, this, ButtonClickManager.clickinstance.AllTitleButtonClick);   而在另外的一个单例脚本中单例分离了执行方法 因为按钮监听太多 需要分离 监听和执行 /** * 基础信息按钮监听 */ public AffirmButton1Cl...

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

239. hitArea用法问题 [ 57%]

...a = closeRect;  // closeBtn 为 Laya.Button 实例 this.closeBtn.on(Event.CLICK,this,this.closeWin); private closeWin():void {     console.log("the window has closed..."); } 2017-09-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链...

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

240. drawToTexture截大图有问题,会丢失 [ 56%]

...      Laya.stage.addChild(this.nsp);         this.nsp.on(Laya.Event.CLICK,this,this.drawImg,null)     }     drawImg(e:Event=null):void{         var copySpr:Laya.Sprite=new Laya.Sprite();         copySpr.texture=this.nsp.drawToTexture(1600,1600,0,0) as Laya.Texture;         thi...

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