大约有 56 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0033 秒)
Laya.EventDispatcher off 删除侦听器 var eventDis = new Laya.EventDispatcher() eventDis.on('TEST_EVENT_DIS', this, someEventHandler, null) eventDis.off('TEST_EVENT_DIS', this, another_eventHandler, false) off 怎样才能 从 EventDispatcher 对象中删除侦听器? ...
来源: Laya_社区 发布时间: 20180914
on和off的bug 是这样的,我写了类似这样的代码a.on(Laya.Event.MOUSE_DOWN, this, onStartDrag); 之后我想去掉拖动,就写了a.off(Laya.Event.MOUSE_DOWN, this, onStartDrag); 但发现不行,于是我改成a.offAll(); 就可以了。 需要说明的是onStartDrag是函数内定...
来源: Laya_社区 发布时间: 20180828
...his, this.onLoop); //移除舞台的鼠标移动事件 Laya.stage.off(Laya.Event.MOUSE_MOVE); } //恢复 GameEx.prototype.resume = function () { //在循环中创建敌人 Laya.timer.frameLoop(1,this,this.onLoop); console.log("恢复播放音乐") Laya.SoundManager.stopMusic(); Laya.SoundManager.p...
来源: Laya_社区 发布时间: 20180514
...单的色块改变位置 package { import laya.display.Sprite; import laya.events.Event; import laya.events.IEventDispatcher; import laya.utils.Browser; import laya.utils.Tween; public class testVH { protected var _tip:Sprite; public function testVH() { IEventDispatcher; Config.isAlpha = tr...
来源: Laya_社区 发布时间: 20190520
取消监听鼠标移动事件,取消不了 Laya.stage.off(Laya.Event.MOUSE_MOVE,this,null); 第三个参数是函数,不能为null吗?是不是和on绑定时的同一个函数,如果on里面用匿名函数,off第三个参数怎么写? 2018-06-23 添加评论 免费帖 --> 分享 微博...
来源: Laya_社区 发布时间: 20180623
移除鼠标事件 btn.on(Event.MOUSE_MOVE, this, onMouseMove); 如何移除btn的该鼠标事件 2017-06-23 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 cuixueying 赞同来自: on用来侦听事件,off用...
来源: Laya_社区 发布时间: 20170623
...stage.bgColor = "#000000"; this.ps = new Laya.Sprite(); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.down2) Laya.stage.on(Laya.Event.MOUSE_UP, this, this.up2) Laya.stage.addChild(this.ps); } down2() { this.a = Laya.stage.mouseX; this.b = Laya.stage.mouseY; console.log("鼠标点击的点" + this....
来源: Laya_社区 发布时间: 20170721
...同来自: VkonSun on用来侦听事件,off用来移除事件,btn.off(Event.MOUSE_MOVE, this, onMouseMove); 2018-03-21 1 0 分享 微博 QZONE 微信 VkonSun 赞同来自: 谢谢 2018-03-21 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, ...
来源: Laya_社区 发布时间: 20180321
...ton; import laya.ani.bone.Templet; import laya.display.Sprite; import laya.events.Event; import laya.utils.Browser; import laya.utils.Stat; import laya.webgl.WebGL; public class ASDemo { private var mAniPath:String; private var mFactory:Templet; private var mCurrIndex:int = 0; private var mArmature:...
来源: Laya_社区 发布时间: 20170406
...lor="#ffffff"; Laya.stage.addChild(this.txt); this.txt.on(Laya.Event.MOUSE_DOWN, this, startScrollText); } function startScrollText(){ this.prevX = this.txt.mouseX; this.prevY = this.txt.mouseY; Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.scrollText); Laya.sta...
来源: Laya_社区 发布时间: 20170810