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

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

61. 2D物理-仿生机器人 [ 80%]

...LE_FIXED_AUTO; Laya.Laya.stage.bgColor = "#232628"; this.Construct(); this.eventListener(); } Construct() { let ground = new Laya.Sprite(); Laya.Laya.stage.addChild(ground); let rigidbody = new Laya.RigidBody(); rigidbody.type = "static"; ground.addComponentIntance(rigidbody); let chainCollider = gr...

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

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

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

63. 多个button如何区分 [ 80%]

... 通过 for 循环 加入多个button 添加事件 this.emojiBut1.on(Laya.Event.CLICK,this,this.onEmojiBut1Click); 多个button 如何区分 点击的哪一个button  可以设置tag吗 或者通过监听事件透传?   附件 : --> 2017-04-25 添加评论 免费帖 --> 分享 微博 QZONE 微...

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

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

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

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

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

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

66. 子容器的事件问题 [ 79%]

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

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

... 提交 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

68. 上层图层怎么传递事件给下层的图层 [ 79%]

...st滑动条会引起单元格上的按钮点击后多次触发点击事件 event自定义事件的问题 微信小游戏与加载图片时不会触发erroe事件 3d物理不能触发onCollisionEnter事件 为什么给Sprite容器添加点击事件没反应 图片添加点击事件 有的不生效 ...

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

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

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

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

...============ 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