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

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

481. 透明区域点击问题 [ 57%]

...0.pos(10, 10); sprite0.mouseEnabled = true; sprite0.name = 'sprite0'; Laya.stage.addChild(sprite0); sprite0.on(Event.CLICK, this, handler_click); 怎么让sp透明区域不可点,有像素的地方才能接受到事件; hitArea,目前只支持圆形,矩形,多边形,而sp绘制的是一个...

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

482. 循环监听按钮,如何进行传参和接受参数 [ 57%]

...Image; console.log('onClickLevel > ' + b.skin); this.removeSelf(); Laya.stage.addChild(new GameMainView());      } 我要怎么从点击的时候传参,然后在点击后的舞台上接受参数进行操作呢 2019-08-02 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相...

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

483. 无法清除指定定时器 [ 57%]

...            trace("______________________");         } this.stage.on(Event.MOUSE_UP, this, onB); private function onB():void          {             Laya.timer.clear(this, this.looppp);             SoundManager.playSound("res/sound/onClick.wav");         ...

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

484. 背景音乐在微信小游戏中播放问题 [ 57%]

...请: 与内容相关的链接 提交 1 个回复 bpmf_d 赞同来自: Laya.stage.on(Laya.Event.FOCUS,this,()=>{}); 可以加一个获得焦点的监听 得到焦点的时候就开始播 2019-05-10 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 ...

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

485. 改变位置后,点击区域不生效了 [ 56%]

...ics.drawRect(0,0,100,100,"#ff0000"); sp.on(Event.CLICK,this,onClick); Laya.stage.addChild(sp); } private function onClick(event:Event):void{ Render._mainCanvas.source.style.left = "100px"; Render._mainCanvas.source.style.top = "100px"; trace("onClick"); } } } 就这么一段简单的代码,求指...

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

486. UI 控件多次调用 RESIZE 回调问题 [ 56%]

...aya.Event.RESIZE, this, () => { console.warn(" resize ===== "); }) Laya.stage.addChild(a); Laya.timer.loop(1000, this, () => { a.addChild(new Laya.Box()); }); --------------- 测试代码如上,每1s会回调一次控件 a 的 RESIZE 方法,这个是否正常? 引擎版本:Laya.version...

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

487. 游戏引导 原来使用 blendMode = "destination-out"; 现在怎么用? [ 56%]

...过2048导致引发上面的问题 this.mask.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000");

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

488. Animation创建和销毁的问题 [ 56%]

...ple() { //初始化引擎 Laya.init(1136, 640,WebGL); trace("ok..."); Laya.stage.on(Event.KEY_DOWN, this, this.onKeydown); } private function onKeydown(event:Event):void { var self:* = this; if(event.keyCode === Keyboard.SPACE) { //移除动画 if(testAnim1) { testAnim1.clear(); testAnim1.removeSelf...

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

489. touches一直为undefined [ 56%]

touches一直为undefined Laya.stage.on(Laya.Event.MOUSE_DOWN, this, onCtrlMoveRockerTouchDown); ......   function onCtrlMoveRockerTouchDown(e) {     console.log("onCtrlMoveRockerTouchDown()");     var touches = e.touches;     if(touches) {     ...取出前两个touch进行计算     } }...

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

490. rigidBody.applyForce 物体不会移动 [ 56%]

...new Laya.Text(); constructor() { //初始化引擎 Laya3D.init(0, 0); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); //加载场景人物腳色 Laya.Scene3D.load( "res/build5/SampleScene.ls", Laya.Handler.create(this, this.onComplete) ...

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