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

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

121. 引擎遮罩报错 [ 65%]

...hild(attItem); } let maskSp:Laya.Sprite = new Laya.Sprite; maskSp.graphics.drawRect(0,0,760,140,'#ffffff'); this.itemSpr.mask = maskSp; 测试 在无mask的情况下不会报错 开启mask之后 cacheAs失效 导致了强制缓存 抛出警告 警告累积一段时间报错 Monica • 2017-09-13 20:...

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

122. 在 tiledmap 插入一个精灵在上面 [ 65%]

...Map)); }   loadedMap(){   this.sp=new Laya.Sprite();   this.sp.graphics.drawRect(0,0,100,100,"#FF0000");   var mapLayer = this.tiledMap.getLayerByIndex(1);   console.info(mapLayer.layerName);   this.sp.pos(0,0);   mapLayer._childs[0].addChild(this.sp); }   }   new GameInfo();   遇到的...

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

123. 请问老师为什么我按照官网的实例播放音频没反应呢? [ 65%]

... var h = 40; var button = new Sprite(); button.size(w, h); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.graphics.fillText(label, w / 2, 8, "25px SimHei", "#FFFFFF", "center"); Laya.stage.addChild(button); return button; } function onPlayMusic(e) { console.log("播放音乐"); SoundManager...

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

124. 舞台上有个label,我能通过截图保存成图片么 [ 65%]

...stage.alignV = Stage.ALIGN_MIDDLE; var sp:Sprite=new Sprite(); sp.graphics.drawRect(0,0,200,200,"#EEFF00"); var label:Label=new Label(); label.fontSize=60; label.text="666"; label.bold=true; label.color="#000000"; sp.addChild(label); sp.size(200,200); Laya.stage.addChild(sp); Laya.timer.frameLoop(60...

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

125. 写消消乐游戏, 如何在tiledMap格子中添加精灵? [ 65%]

...map/map.json",viewRect); // 精灵 var sp = new Laya.Sprite(); sp.graphics.drawRect(0, 0, 100, 100, "#FF0000", "#0000FF", 1) sp.zOrder = 1000;     请问这里如何把精灵添加到地图中?看文档没看明白啊, 其他回答仿写都无效果. 2018-07-21 添加评论 免费帖 --> 分享 ...

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

126. 怎么实现一个Timer的loop的delay时间越来越短? [ 65%]

...rowser.height); Laya.stage.bgColor="#EEFFCC"; sp=new Sprite(); sp.graphics.drawRect(0,0,200,200,"#FF0000"); Laya.stage.addChild(sp); Laya.timer.loop(delay,this,onLoop); } private function onLoop():void { delay-=50; sp.x+=20; Laya.timer.clear(this,onLoop); Laya.timer.loop(delay,this,onLoop); } 2017-0...

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

127. 扇形遮罩画不全画了一个很奇怪的形状但是矩形的就没问题。显示效果如下:版本号1.7.10 [ 65%]

...        }                         maskSp.graphics.drawRect(0, 0, w, height, '#ffffff');                 }             }         }                  public function setPercentage(p:Number):void         {             this.per...

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

128. 安卓机截图变成黑块,ios和pc没问题 [ 64%]

...private function test():void { var sp1:Sprite = new Sprite(); sp1.graphics.drawRect(0,0,300,200,"#ff0000"); var htmlCanvas:HTMLCanvas = sp1.drawToCanvas(300,200,0,0); Laya.timer.once(1000,this,function():void{ var texture:Texture = new Texture(htmlCanvas); var sp2:Sprite = new Sprite(); sp2.graphics...

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

129. Dragonbones龙骨动画 播放不同动作出现闪烁 混乱 [ 64%]

...s, this.onError); this.templet.loadAni(this.aniUrl); this.maskBox.graphics.drawRect(0,0,this.width,this.height,'#ffffff'); this.mask = this.maskBox; this.maskBox.alpha=0; // this.show(); } private parseComplete():void { //创建模式为1,可以启用换装 this.skeleton =this.templet.buildArmatur...

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

130. 阻止点击穿透问题 [ 64%]

...ertLayer.size(W, H);   let bg = new Sprite(); bg.alpha = 0.8; bg.graphics.drawRect(0,0,W,H,"#000000"); this.prizeAlertLayer.addChild(bg); this.prizeAlertLayer.addChild(Main.items["prizeinfo"]); Laya.stage.addChild(this.prizeAlertLayer);   this.prizeAlertLayer.visible = false; 附件 : --> 2018-06-...

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