大约有 185 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0036 秒)
...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
...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
... 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
...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
...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
...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
... } maskSp.graphics.drawRect(0, 0, w, height, '#ffffff'); } } } public function setPercentage(p:Number):void { this.per...
来源: Laya_社区 发布时间: 20180404
...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
...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
...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