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

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

111. 点击拖动图片,当鼠标移出再移回舞台中时如何保持点击状态 [ 50%]

...move和up事件 sp.on(Event.MOUSE_DOWN,this,onDown); Laya.stage.on(Event.MOUSE_UP,this,onUp); } private function onUp():void { Laya.stage.off(Event.MOUSE_MOVE,this,onMove); } private function onDown(e:Event):void { Laya.stage.on(Event.MOUSE_MOVE,this,onMove); } private function onMove():void { // ...

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

112. layaAir真的没办法做涂鸦板? [ 50%]

...; Laya.stage.on(Laya.Event.MOUSE_MOVE,this,bb) }) Laya.stage.on(Laya.Event.MOUSE_UP,this,function(){ Laya.stage.off(Laya.Event.MOUSE_MOVE,this,bb) }) function bb(e){ s.graphics.clear(); arr[arr.length-1].push(e.stageX); arr[arr.length-1].push(e.stageY); for(var i=0;i<arr.length;i++){ s.graphics.d...

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

113. 微信小游戏声音,使用playsound播放音效问题 [ 50%]

...会啊!我测试了一下并没有你说的问题! this.stage.on(Event.MOUSE_UP, this, onB); private function onB():void          {             Laya.SoundManager.playSound("res/sound/onClick.wav");         } 你看看是不是你的代码逻辑有问题那? 2018-05-03 0 2...

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

114. 3D模型旋转问题,鼠标移动之后,根据按下移动的X坐标差值判断左右旋转,但是会越转越快,请问是什么问题? [ 50%]

...s.rotate(vec); } }   监听的鼠标移动事件 Laya.stage.on(Laya.Event.MOUSE_UP,this,this.mouseUp); Laya.stage.on(Laya.Event.MOUSE_DOWN,this,this.mouseDown); Laya.stage.on(Laya.Event.MOUSE_MOVE,this,this.mouseMove);   private mouseDown():void{ let mX:number = Laya.stage.mouseX; this.lastMouseX ...

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

115. 重复背景,全方向地图拖动Demo [ 49%]

...age.on(Laya.Event.MOUSE_DOWN,this,this.mouseDown) Laya.stage.on(Laya.Event.MOUSE_UP,this,this.mouseUp) this.moveMap(this.offsetX,this.offsetY) } moveMap(x,y){ let X = -x00 let Y = -y00 this.map0.x = X this.map0.y = Y this.map3.x = X + 1800 this.map3.y = Y + 1800 if(X < -540){ this.map1.x = X + 18...

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

116. 寻路系统(JavaScript-3D基础(JS)-LayaAir3D之高级应用) [ 49%]

...路径数据 ```typescript //监听鼠标抬起 Laya.stage.on(Laya.Event.MOUSE_UP, this, function() { this.index = 0; //获取每次生成路径 this.getGridIndex(this.path[this.curPathIndex % this.pointCount].x, this.path[this.curPathIndex++ % this.pointCount].z, this.startPoint); this.getGridIndex...

来源: Laya2.0_文档 发布时间: 20210714

117. 【求助】关于Cannot read property 'visible' of undefined问题 [ 49%]

...entFood.on(Event.MOUSE_DOWN, this, onMouseDown); this.currentFood.on(Event.MOUSE_UP, this, onMouseUp); }currentFood也是Food类,是用来指向在foodList中处于下标index的元素,我是想在用currentFood指向某个元素,给这个元素添加事件,让其可以执行一些动作,...

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

118. 寻路系统(TypeScript-3D基础(TS)-LayaAir3D之高级应用) [ 48%]

...路径数据 ```typescript //监听鼠标抬起 Laya.stage.on(Laya.Event.MOUSE_UP, this, function() { this.index = 0; //获取每次生成路径 this.getGridIndex(this.path[this.curPathIndex % this.pointCount].x, this.path[this.curPathIndex++ % this.pointCount].z, this.startPoint); this.getGridIndex...

来源: Laya2.0_文档 发布时间: 20210715

119. 寻路系统(ActionScript-3D基础(AS3)-LayaAir3D之高级应用) [ 48%]

...界的路径数据 ```typescript //监听鼠标抬起 Laya.stage.on(Event.MOUSE_UP, this, function():void { index = 0; //获取每次生成路径 getGridIndex(path[curPathIndex % pointCount].x, path[curPathIndex++ % pointCount].z, startPoint); getGridIndex(path[nextPathIndex % pointCount].x,path[nex...

来源: Laya2.0_文档 发布时间: 20210714

120. 图片像素精准点击问题! [ 48%]

...n(Laya.Event.MOUSE_MOVE, this, this.onMouseMove); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.onMouseUp, [true]); } /** 按钮动画处理 */ private hitTest(t: Laya.Image) { let s = t.source.getPixels(t.mouseX, t.mouseY, 1, 1).join(''); if (s == '0000') return false; this.down = t; return true; }...

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