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

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

81. 新手入坑请教下各位大神关于LayaMaxUI问题 [ 81%]

...Login:Laya.Button;  constructor(){ super();  this.btnLogin.on(Laya.Event.CLICK,this,()=>{ console.log('btnLogin click') }) }  createChildren(){ super.createChildren(); this.loadScene('LoginScene'); }   }     import LoginScene from "./script/LoginScene" /* * 游戏初始化配置; */ export ...

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

82. 按钮失效,同UI里的一个图片超链接点击后再返回,出现按钮失效。 [ 81%]

...bottom+100; }  //事件注册 //开始游戏 this.StartLeft.on(Laya.Event.CLICK,null,function(){ //TO GamePage2 console.log("left onclick"); Laya.stage.addChild(new GameView); });  //分享快乐 this.StartRight.on(Laya.Event.CLICK,null,function(){ //超链接 onLink(href); });  //天猫Logo this...

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

83. Button点击函数逻辑bug [ 80%]

...gle === false && this._selected) return; if (e.type === Laya.Event.CLICK) { this.toggle && (this.selected = !this._selected); this._clickHandler && this._clickHandler.run(); return; } !this._selected && (this.state = Button.stateMap[e.type]); }上面逻辑当clickHand...

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

84. 关于graphics镂空的问题https://ask.layabox.com/question/139 [ 80%]

...s.drawRect(0,0,100,100,'#ff0000'); Laya.stage.addChild(redBox); redBox.on("click",this,function(){ trace("click redbox"); }); redBox.on("mouseover",this,function(){ redBox.graphics.clear(); redBox.graphics.drawRect(0,0,100,100,'#00ff00'); }); redBox.on("mouseout",this,function(){ redBox.graphics.cle...

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

85. 如何获取当前选中的tree节点 [ 80%]

...都需要被选中。 【我的方法】: 1,在鼠标事件中,根据click事件的索引,从展开list中拿到当前tree节点的属性值 2,根据属性值,找到tree的xml数据源中,当前点击条目所在的xml节点。 3,将第二步中找到的xml节点,及其所有子节...

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

86. qq小游戏网络音效无法重复播放(有复现demo) [ 79%]

...现工程,具体代码在GameUiTest.js this.imaAudioLocal.on(Laya.Event.CLICK, this, ()=>{ let resUrl = "res/audio/sound_click.wav"; Laya.SoundManager.playSound(resUrl, 1); });  this.imaAudioNet.on(Laya.Event.CLICK, this, ()=>{ let resUrl = "https://具体地址见工程代码/h5/gun_res/v6...

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

87. ios load后 声音播放问题 [ 79%]

...都是正常的,在ios和mac Safari下是undefined 放在一个sprite的click事件里 同样也是undefined   2017-08-11 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 Funkyfun 赞同来自: 每人理,自己...

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

88. 2D物理-仿生机器人 [ 78%]

...e(revoluteJoint); } eventListener() { Laya.Laya.stage.on(Laya.Event.DOUBLE_CLICK, this, () => { this.motorJoint.motorSpeed = -this.motorJoint.motorSpeed; }); Laya.Laya.stage.on(Laya.Event.CLICK, this, () => { const chassisBody = this.chassis.getComponent(Laya.RigidBody); const chassisPos = chassisBo...

来源: Laya2.0_示例 发布时间: 20240930

89. 关于遍历产生的sprite的点击事件,急,大神帮看哈 [ 77%]

...置一个宽高,就是size或hitArea 2、直接在for遍历下对sp进行CLICK的监听即可,sp.size(xxx,xxx);sp.on(Event.CLICK,this,onSpClick) 3、点击sp时,直接获取sp.index值即可(e.target.index)! 2017-02-21 1 0 分享 微博 QZONE 微信 lift6220819 赞同来自: q3952124...

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

90. list中的item类中的button注册事件不响应 是怎么回事呢 ?可以帮帮我解答下吗 [ 77%]

...ize(Item.WID, Item.HEI); this.initBuild(); this.skin_btn_use.on(Laya.Event.CLICK,this,this.onSkinBtnUseClick) } private onSkinBtnUseClick(){ console.log("使用"); }   //btn 有宽高 2018-08-28 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相...

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