大约有 462 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0050 秒)
Laya_社区(281) Laya2.0_api(59) laya_api(55) Laya2.0_文档(24) Laya3.0_文档(16) Laya2.0_示例(15) Laya_示例(9) Laya3.0_api(3)
...ar btn = new Laya.Button(skin,name); Laya.stage.addChild(btn); btn.on(Laya.Event.CLICK,this,cb); btn.size(147,55); btn.name = name; btn.right = 10; btn.top = index * (btn.height + 10); return btn; } onLoaded(){ for (let index = 0; index = ["res/button.png", "res/button.png", "res/button.png"]; priva...
来源: Laya2.0_示例 发布时间: 20251130
Laya的Mouse Event有没有类似COCOS-JS的event.touch.getDelta() 在参考一些代码,发现Cocos-JS有个api是touchmove中,获取移动的增量的:event.touch.getDelta(). 挺好的.但没有找到Laya中有类似的. 2018-10-29 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找...
来源: Laya_社区 发布时间: 20181029
关于event中只读属性touches,问题,求解 主类: package { import laya.display.Text; import laya.events.Event; import laya.webgl.WebGL; public class DemoTouch { public function DemoTouch() { Laya.init(800, 600, WebGL); Laya.stage.bgColor = "#232628"; var txt:Text = new Text(); txt.text...
来源: Laya_社区 发布时间: 20170519
EventDispatcher EventDispatcher事件能不能给按钮发送(如点击(Event.ClICK))的事件(但实际上按钮没有被点击) 2017-09-11 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 3 个回复 cuixueying ...
来源: Laya_社区 发布时间: 20170911
...sprite 如何移除点击事件 我对stage添加click事件后(通过on(Event.click)),想移除掉这个事件,用mouseEnable=false,无效 2018-01-31 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 qian ...
来源: Laya_社区 发布时间: 20180131
...right.bold = true; copyright.pos(20, g_stat_heiht - 35); copyright.on(Laya.Event.CLICK, this, function() { window.location.href = "http://www.coderluan.com"; }); Laya.stage.addChild(copyright); 3.设置积分板和开始菜单 右下弄了个“点击开始游戏”的文本,点击只会游戏开...
来源: Laya_社区 发布时间: 20160623
...oginView.prototype.init = function () { this.btnReg.on(Laya.Event.CLICK, this, this.onBtnReg); this.btnLogin.on(Laya.Event.CLICK, this, this.onBtnLogin); this.dlg = new NormalDialog(); this.dlg.init(); }; 附件 : --> firstgame.ra...
来源: Laya_社区 发布时间: 20170317
...FIXED_AUTO; Laya.Laya.stage.bgColor = "#232628"; this.createBridge(); this.eventListener(); } createBridge() { const startPosX = 250, startPosY = 450; let ground = new Laya.Sprite(); Laya.Laya.stage.addChild(ground); let groundBody = new Laya.RigidBody(); groundBody.type = "static"; ground.addCompon...
来源: Laya2.0_示例 发布时间: 20251130
...如下: 以下是代码: protected onEnter(){ this.img_sample.on(Laya.Event.CLICK, this, this.onImgClick); Laya.loader.load("res/atlas/comp/skeleton.atlas"); //创建动画模板 this.templet = new Laya.Templet(); this.templet.on(Laya.Event.COMPLETE, this, this.parseComplete); this.templet.on(L...
来源: Laya_社区 发布时间: 20180905
...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_文档 发布时间: 20251010