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

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

471. 请问怎么制作一个layabox js版本的加载效果 [ 70%]

...5,5,5"; // progressBar.changeHandler = new Handler(this, null); Laya.stage.addChild(progressBar); Laya.timer.loop(300, this, changeValue); } function changeValue() { if (progressBar.value >= 1){ progressBar.value = 0; Laya.stage.removeSelf(); //将登录页面从内存销毁 // Laya.stage.destroy...

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

472. 关于资源加载的问题 [ 70%]

..., Handler.create(null, ()=>{ this.uiView = new SharkItOff(); Laya.stage.addChild(this.uiView); })); 先加载图集,图集加载完再new一个界面。但是界面里的图片都不显示 thekingreturn • 2018-03-27 20:42 [warn]Retry to load: games/game_13/image/shake_07.png [warn]Retry to lo...

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

473. 场景切换造成的FPS下降的优化思路请教 [ 70%]

...化思路请教 现在不同场景都是继承的Sprite,原来是通过addChild和removeChild直接管控不同场景的显示和隐藏的,但是发现发布到手机后FPS会瞬间掉到个位数,然后再恢复到原来一样。今天想到能否使用visible直接控制显示隐藏,发现...

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

474. 这种进度条怎么实现? [ 70%]

...is.CIRCLE_WIDTH) >> 1, (this.DEF_SIZE - 20) >> 1, "#fff") this.addChild(this.$circleSprite) this.start() } public start() { this.timerLoop(2, this, this.draw) } public draw() { if (this.startY >= 270) { this.clearTimer(this, this.draw) } this.startY++ this.graphics.clear() this.graphi...

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

475. 求助,屏幕旋转后滚动条没有跟随旋转 [ 70%]

...(638, 527); panel.vScrollBarSkin = "CommDialog/vscroll.png"; this.sp_wanfa.addChild(panel); let t = new Laya.Label(); t.width = 638; t.fontSize = 25; t.wordWrap = true; t.color = "#976A4F"; t.overflow = "scroll" t.leading = 20; t.text =WanF.xinxi; panel.addChild(t); } public static xinxi = ` 信息...

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

476. 显示对象的mask缩放为0时遮罩效果不生效 [ 70%]

... 0, testSp.width, testSp.height, '#FF0000'); testSp.mask = tmpMask; testSp.addChild(tmpMask); Laya.stage.addChild(testSp); let i = 0; tmpMask.scaleX = i / 3; Laya.stage.on(Laya.Event.CLICK, this, ()=>{ i = (i + 1) % 4; tmpMask.scaleX = i / 3; }); 附件 : --> 2020-04-21 添加评论 免费帖 -->...

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

477. 我想移动容器来实现前进的动画,但是移动不了。这里的y有问题 但是又不知道改成什么 [ 70%]

...载背景1 var bg1 = new Sprite(); bg1.loadImage("war/bc.png"); Laya.stage.addChild(bg1);   //加载背景2 var bg2 = new Sprite(); bg2.loadImage("war/bc.png"); //更改背景2 放在背景1的上面 bg2.pos(0,852); Laya.stage.addChild(this); Laya.timer.frameLoop(1,this,myLoop);   } function myLoo...

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

478. 急急急,如何设置按钮点击加载ani [ 69%]

...      var btn:Button = new Button(skin);          Laya.stage.addChild(btn);             btn.pos(100,100);             //按钮被点击的回调             btn.clickHandler=new Handler(this, onClickButton)      }      private function onClic...

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

479. 两个物体 ,如果在update里修改其中一个物体的rotationEuler,会触发另一个物体的onTriggerEnter回调 [ 69%]

...wScene = <Laya.Scene3D>Util3d.getRes(this.sMapRes, false) Laya.stage.addChild(pNewScene); Util3d.getChildByPath(pNewScene, "Main Camera").active = false; let pBull = <Laya.Sprite3D>Util3d.getRes(this.sBullRes) let pEnemy = <Laya.Sprite3D>Util3d.getRes(this.sEnemyRes) pNewScene.addC...

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

480. dialog的lock属性没出现 [ 69%]

... dialog:Dialog = new Dialog(); var bg:Image = new Image(assets[0]); dialog.addChild(bg); var button:Button = new Button(assets[1]); button.name = Dialog.CLOSE; button.pos(DIALOG_WIDTH - CLOSE_BTN_WIDTH - CLOSE_BTN_PADDING, CLOSE_BTN_PADDING); dialog.addChild(button); dialog.dragArea = "0,0," + DIALO...

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