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

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

11. 如何为list内部的button添加事件 [ 81%]

...6 14:39 经过测试在List.mouseHandler中点其他的元素都能通过e.target.name获取到名字,唯独textinput通过e.target.name获取到名字为空,而且e.type为mousedown,希望能够提供一个demo能够读取到list中的textinput的text。 weiyongwill • 2017-01-09 09:33 @cuix...

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

12. Sprite-屏幕截图 [ 78%]

...idth,this.drawSp.height,"#ff0000"); } private _onclick(e:Event){ switch (e.target.name) { case this.nameArr[0]: var base64Url:string = this._canvas.toDataURL("image/png",1); this.drawImage.skin = base64Url; break; case this.nameArr[1]: var text:Texture = Laya.stage.drawToTexture(Browser.clientWidth,...

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

13. 请问 layaair2.0的js有没有api可以查询 例如Laya.Script [ 77%]

...发事件我摸索出来了   onMouseDown(e){ console.log("mouseDown "+e.target.name); } onMouseUp(e){ console.log("mouseup"); } 2018-10-29 0 0 分享 微博 QZONE 微信 coder 赞同来自: 可是 https://layaair.ldc.layabox.com/api 实在没有对js有什么描述,现在两眼一片黑,全靠...

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

14. 3D中摄像机绕物体旋转该如何实现? [ 77%]

...true; /// <summary> /// Around center. /// </summary> //public target: Transform3D; public AroundPos: Vector3 = new Vector3(); /// <summary> /// Settings of mouse button, pointer and scrollwheel. /// </summary> public mouseSettings: MouseSettings = new MouseSettings(0, 1, 0.3...

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

15. 官方案例里摄像机绕物体旋转脚本的问题 [ 76%]

...true; /// <summary> /// Around center. /// </summary> //public target: Transform3D; public AroundPos: Vector3 = new Vector3(); /// <summary> /// Settings of mouse button, pointer and scrollwheel. /// </summary> public mouseSettings: MouseSettings = new MouseSettings(0, 1, 0.3...

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

16. tree异步选中问题 [ 74%]

... • 2018-03-24 14:57 已解决: if (e.type == Laya.Event.CLICK) { if (e.target.name == "arrow") { //Tree的开/关,当打开一个时,另一个关闭 var item:Cell = e.target.parent as Cell; if (item.dataSource.isOpen == true) { if (this.selectedIndex == -1) { this.selectedIndex = i...

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

17. 类似于list下的按钮监听 !如何去做。 [ 73%]

...; public function yfqian_GameUi(e:Event):void{ trace("Sprite:",e.target.name) }

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

18. LayaAir开发笔记(1)五十音图连连看 [ 71%]

...atue == true) { if ((card_A == -1) && (card_B == -1)) { card_A = e.target.name; button[card_A].color = "red"; } else if ((card_A != -1) && (card_B == -1)) { card_B = e.target.name; if ((g_list_A.indexOf(button[card_A].text) != -1) && (g_list_A.indexOf(button[card_A].text) == ...

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

19. Animation 播放完成回调有参数吗 [ 68%]

...Event.COMPLETE, this, bfwc); function bfwc(e){         console.log(e.target.name); }    是错误的 2017-07-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 Monica - 知识达人 赞同来自: 不是直...

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

20. Button和下面的3D物体重叠,点击button,3D物体会同时响应自己的鼠标脚本 [ 64%]

...对象是scene) Laya.stage.on(Laya.Event.CLICK,this,function(e) { if(e.target.name == "scene的名字") { this.isClick = true; //如果点击的是屏幕的空白处,那么让 isClick 为真 } else { this.isClick = false; //如果点击的不是空白处,是屏幕上别的UI,让 isClick 为...

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