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

大约有 385 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0043 秒)

161. Skeleton如何出发鼠标点击事件? [ 61%]

...接创建动画 skeleton.load("anims/lhd/anim_lhd.sk"); skeleton.on(Laya.Event.CLICK,this,this.onEnterRoomLHD) 2019-06-09 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 0 个回复 为什么被折叠? 0 个回复被折叠 要...

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

162. 使用 addChild 加载界面后,绑定事件报错 [ 60%]

...uctor() {         super();          this.btnStart.on(Laya.Event.CLICK, this, this.startGame);     }      startGame(): void {         //Laya.Scene.open("GameView.scene");         if (!Main.gameView) {             Main.gameView = new GameView();  ...

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

163. 父元素,子元素,兄弟元素 [ 60%]

...问题,其实很简单,点击方法中,会带一个参数:e:Laya.Event,这个能数有阻止点击事件冒泡 点击事件: this.btnHome.on(Laya.Event.CLICK, this, this.homeClick);   private homeClick(e) { //防止点击事件穿透 e.stopPropagation(); } 2018-10-12 0 0 分享 微博...

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

164. 请问下怎么得到按钮点击的次数 [ 60%]

...击一下,计数器+1,在点击一下,计数器+2 我用按钮btn.on(Event.CLICK,this,OnChargeButtonClik)监听回调 在回调函数中计数器永远等于1 请问一下怎么解决 2018-05-17 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容...

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

165. 2.x引擎项目升级指南 · LayaAir3.0文档 · LAYABOX [ 60%]

...Laya.Script命名函数方式处理输入。例如: this.aNode.on(Laya.Event.CLICK, ()=> { console.log("clicked"); }); class MyScript extends Laya.Script { //脚本事件 onMouseClick(e:Event) { console.log("clicked"); } } aNode.addComponent(MyScript); 以上两种方式是等价的,且在纯...

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

166. drawToTexture截大图有问题,会丢失 [ 60%]

...e;         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;       ...

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

167. sprite 添加点击事件没反应,对sprite设置了size也没用 [ 60%]

... ; Laya.stage.addChild(this.btn) ; this.btn.size(25,25) ; this.btn.on(Laya.Event.CLICK, this, music.music_voice_toggle); 代码是这样的 , 图片上传不了,代码直接贴上来 2017-08-03 0 0 分享 微博 QZONE 微信 cuixueying 赞同来自: 最好上传个能重现问题的Demo,只看...

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

168. 使用webgl之后toDataUrl返回黑色的图像 [ 60%]

...,请参考以下代码 package { import laya.display.Sprite; import laya.events.Event; import laya.utils.Browser; import laya.utils.Stat; import laya.webgl.WebGL; public class LayaAirDemo { private var sp:Sprite ; public function LayaAirDemo() { //初始化引擎 Laya.init(Browser.width, Browser.h...

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

169. TextInput的select()方法问题 [ 60%]

...框B(TextInput)调用select()方法没有效果。 B.text = "123456"; A.on(Event.CLICK,this,OnClick);   private function OnClick():void {          B.select(); } 2017-05-25 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交...

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

170. 初学者问题 Dialog的popup()方法没有起到效果 [ 60%]

...问题 Dialog的popup()方法没有起到效果 this.btn_reg.on(Laya.Event.CLICK,null,()=> { var dlg : MyDialog = new MyDialog("注册功能暂未开通!"); dlg.popup(true); Laya.stage.addChild(dlg); });   2018-03-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关...

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