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

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

31. sprite点击事件 位置便宜 [ 75%]

...鼠标事件 rect.on(Event.MOUSE_DOWN, this, mouseHandler); rect.on(Event.MOUSE_UP, this, mouseHandler); rect.on(Event.CLICK, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_DOWN, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_UP, this, mouseHandler); rect.on(Event.RIGHT_CLICK, this, mouseHandler); r...

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

32. 加载-销毁Texture使用的图片资源 [ 75%]

...(20, 160); Laya.stage.addChild(this.btn); //添加侦听 this.btn.on(Event.MOUSE_UP, this, this.onMouseUp); } /** * 鼠标事件响应函数 * @param evt */ onMouseUp(evt) { if (this.isDestroyed) { //通过设置 visible=true ,来触发渲染,然后引擎会自动恢复资源 this.spBg.visible =...

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

33. 文字在框内滑动、滚动文本 [ 75%]

...a.Event.MOUSE_MOVE, this, this.scrollText);     Laya.stage.on(Laya.Event.MOUSE_UP, this, this.finishScroll); } function finishScroll(){     Laya.stage.off(Laya.Event.MOUSE_MOVE, this, this.scrollText);     Laya.stage.off(Laya.Event.MOUSE_UP, this, this.finishScroll); } function scrollText(){ ...

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

34. 加载-销毁Texture使用的图片资源 [ 75%]

...(20, 160); Laya.stage.addChild(this.btn); //添加侦听 this.btn.on(Event.MOUSE_UP, this, this.onMouseUp); }; /** * 鼠标事件响应函数 * @param evt */ GameMain.prototype.onMouseUp = function (evt) { if (this.isDestroyed) { //通过设置 visible=true ,来触发渲染,然后引擎会自动...

来源: Laya_示例 发布时间: 20240929

35. 那个文本溢出需要滚动条怎么弄,API里面就说用Scroll接口,小白 不懂怎么弄 [ 75%]

...a.stage.on(Laya.Event.MOUSE_MOVE,this,scrollText);Laya.stage.on(Laya.Event.MOUSE_UP,this,finishScrollText);}/* 停止滚动文本 */function finishScrollText(){Laya.stage.off(Laya.Event.MOUSE_MOVE, this, this.scrollText);Laya.stage.off(Laya.Event.MOUSE_UP, this, this.finishScrollText);}/* 鼠标滚...

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

36. 自动旋转后残影 [ 74%]

...moveHandler); _tip.off(Event.MOUSE_DOWN,this,_downHandler); _tip.off(Event.MOUSE_UP,this,_upHandler); _tip.destroy(); } _tip = new Sprite(); _tip.graphics.drawRect(0,0,100,100,"#FFFFFF"); _tip.size(100,100); _tip.on(Event.MOUSE_DOWN,this,_downHandler); _tip.on(Event.MOUSE_UP,this,_upHandle...

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

37. 请问在手机里在屏幕上按下,然后滑动,然后离开屏幕表面(未超出屏幕范围)会触发哪些事件? [ 74%]

...(未超出屏幕范围)会触发哪些事件? MOUSE_DOWN MOUSE_OVER MOUSE_UP? 会触发MOUSE_OUT吗? 因为在LayaIDE里难以模拟手机上的操作,而手机上又看不了打印,所以才问一下。 2018-04-16 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关...

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

38. webGL模式下 graphic画线涂鸦,一直不停画会出现线条异常 [ 74%]

....on(Laya.Event.MOUSE_MOVE, this, this.__mouseMove); this.bmp.on(Laya.Event.MOUSE_UP, this, this.__mouseUp); console.log(this.pos0.x); } __mouseMove(e:Event){ this.pos1.x=this.bmp.mouseX this.pos1.y=this.bmp.mouseY; if(Utils3D.getThis.getDistance(this.pos0,this.pos1)>10){ this.bmp.graphics.drawLin...

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

39. 代码创建精灵监听不到事件? [ 73%]

...r arr = {data: StorageRoom.map_storageData[0][0],tag:0}; box.on(Laya.Event.MOUSE_UP,this,this.onclick,[arr]);   var _proto = StorageUILayer.prototype;   _proto.onclick = function(params){ console.log("--------------------------------hhhhhhhhhhh- "); }   -------------------------------------------...

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

40. 分享一个虚拟摇杆,比较粗糙,没做优化 [ 73%]

...s.starY = e.stageY; //添加弹起和移动事件 this.layer.on(Laya.Event.MOUSE_UP, this, this.upFun); this.layer.on(Laya.Event.MOUSE_MOVE, this, this.moveFun); } //弹起事件 ModeKey.prototype.upFun = function () { this.isDown = false; this.isUp = false; this.isMove = false; this.isMode = "stop"...

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