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

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

61. Button点击函数逻辑bug [ 82%]

...is.toggle === 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]); }上面逻辑当cli...

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

62. click 事件 怎么获取当前点击的对象 [ 81%]

...邀请: 与内容相关的链接 提交 1 个回复 hj 赞同来自: 你去Event底层看一下,有触摸点列表,还有一个当前冒泡对象 2018-10-11 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 Nevermore 相关问题 两个...

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

63. 给以个对象绑定两个on方法为什么只能执行一次 ? [ 81%]

...er.create(this,this.clickEnd));         }         this.obj.on(Laya.Event.CLICK,this,this.init);     }     return BtnFeed; })(); //实例化上面的类 _proto.getFeedBtn = function(){         this.feedBtn = [             this.myHome,//我的家园             this.famlily...

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

64. 子容器的事件问题 [ 81%]

...wTest(); //testUI.addChildAt(vhvt, 0); testUI.addChild(vhvt); vhvt.on(laya.events.Event.CLICK, this, (event: Laya.Event) => { console.log("为什么这里不进来"); }); } /**  * ViewHeadViewTest  */ class ViewHeadViewTest extends Laya.Sprite {     constructor() {         super();     ...

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

65. 为什么给Sprite容器添加点击事件没反应 [ 81%]

... 提交 2 个回复 honeyzzzz 赞同来自: cuixueying 、Y_Yao 改为Laya.Event试试?昨天我也遇到了。。。 2017-04-21 2 1 分享 微博 QZONE 微信 ippon 赞同来自: 把事件名称写完整可能比较安全,比如Laya.Event.Click 2019-02-21 0 0 分享 微博 QZONE 微信 为什...

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

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

...ic btnLogin: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" /* * 游戏初始化配置; */ e...

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

67. Button连续点击触发MOUSE_OUT事件问题 [ 80%]

...============ button width: 155, height: 155 mouse position, x: 374, y: 835 event type: click button width: 155, height: 155 mouse position, x: 374, y: 835 event type: mouseout button width: 155, height: 155 mouse position, x: 374, y: 835 event type: click button width: 155, height: 155 mouse positio...

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

68. 请问:Ts下如何实现打开照相机和系统图库的方法?IOS和Android [ 80%]

...         Laya.stage.addChild(button);         button.on(laya.events.Event.CLICK,this,function () {             let photo = laya.utils.Browser.getElementById("photo");            photo.click();         });     } } new GameMain(); 为什么 click事件没...

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

69. 如何能监听到TouchStart和TouchEnd事件 [ 79%]

...链接 提交 2 个回复 189*****192 赞同来自: Sean8023 Laya.stage.on(Event.MOUSE_UP, this, onApeRelease); Laya.stage.on(Event.MOUSE_DOWN, this, onApeRelease); 通过 Event  类型 监听动作  class Event {         /** 一个空的 Event 对象。用于事件派发中转使用。*/ ...

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

70. Laya tiledmap 监听事件未响应 [ 79%]

...stPrior = true;         Laya.stage.focus = _mapSprite;         let event = _mapSprite.on(Laya.Event.CLICK, this, () => {             LogUtil.w("响应点击事件")         })     }   尝试使用focus 好像也没有响应 请问大佬们能解答一下吗 附件 : --> 2022-...

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