大约有 176 项符合查询结果, 库内数据总量为 30,935 项。 (搜索耗时: 0.0036 秒)
Laya_社区(90) Laya3.0_api(61) Laya2.0_文档(7) Laya2.0_示例(6) Laya_示例(5) Laya3.0_文档(5) laya_api(1) Laya2.0_api(1)
...unction CreateBtn(xx:int,yy:int):Sprite { var btn:Sprite=new Sprite(); btn.graphics.drawRect(0,0,200,50,"#FF0000"); btn.pos(100,400); var text:Text=new Text(); text.text="Draw"; btn.addChild(text); Laya.stage.addChild(btn); btn.size(200,50); return btn; } //点击DrawToCanvas按钮,进行截屏 pr...
来源: Laya_社区 发布时间: 20170822
...绘的切下来的部分,但黄色的原图一直还在,即便调用了graphics.clear()方法 这是我重绘部分的代码,我是应该用sprite.graphics去重绘,还是该调用Laya.Render.context中的方法去重绘,绘制部分代码如下(points,是我裁切后的多边形位...
来源: Laya_社区 发布时间: 20200428
... + 3; this.vmask = new Laya.Sprite(); this.vmask.pos(15,15); this.vmask.graphics.drawPie(0, 0, 20, -90, 270, "#000000"); this.progress.addChild(this.progressvalue); this.progressvalue.mask = this.vmask; this.changevalue = function(value) { this.targetvalue = value; target = parseInt(360 * valu...
来源: Laya_社区 发布时间: 20180725
...x.toString() +".bmp"; img.graphics.clear(); var txture:Texture = Laya.loader.getRes(url); img.graphics.drawTexture(txture); img.size(txture.width,txture.height); }...
来源: Laya_社区 发布时间: 20170918
...,点击则可正常关闭); 请指教! // 写法一 let g:Laya.Graphics = new Laya.Graphics(); g.drawRect(this.closeBtn.x-10,this.closeBtn.y-10,this.closeBtn.width+20,this.closeBtn.height+20,"#FF0000"); let hitA:Laya.HitArea = new Laya.HitArea(); hitA.hit = g; this.closeBtn.hitArea = hitA;...
来源: Laya_社区 发布时间: 20170920
...e.addChild(mLabelSprite); mLabelSprite.pos(mStartX, mStartY); mLabelSprite.graphics.fillText(tEventData.name, 0, 0, "20px Arial", "#ff0000", "center"); Tween.to(mLabelSprite, { y: mStartY - 200 }, 1000, null, Handler.create(this, this.playEnd)) } playEnd() { mLabelSprite.removeSelf(); } } new Skelet...
来源: Laya2.0_示例 发布时间: 20250312
发布微信小游戏,sprite的graphics.drawPoly安卓平台会引起花屏 发布微信小游戏,sprite的graphics.drawPoly安卓平台会引起花屏 做了两个进度条,一个是用sprite做的,一个是用fairygui的进度条组件做的,当进度条的value值第二次以上为0的...
来源: Laya_社区 发布时间: 20221117
...游戏开发基础,本篇从API到示例分别介绍Sprite.loadImage与Graphics.drawTexture两种显示图片的方法。 ## 1、用loadImage方法显示与切换图片 ### 1.1 loadImage API概述 在API文档中搜索laya.display.Sprite,可以找到loadImage()方法,如图1所示,我们先...
来源: Laya2.0_文档 发布时间: 20210715
...; var maskArea = new Sprite(); guideContainer.addChild(maskArea); maskArea.graphics.drawRect(0, 0, width, height, "#000000"); maskArea.alpha = 0.5; var interactionArea = new Sprite(); guideContainer.addChild(interactionArea); interactionArea.blendMode = "destination-out"; var tipContainer = new Spri...
来源: Laya_社区 发布时间: 20171031
...点的纹理 (this.owner as Laya.Sprite).graphics.clear(); var t: Laya.Texture = Laya.loader.getRes("puzzlePic/pi-" +this.levelNum +"-"+this.owner.name.slice(4,1)+ "-2.png"); (this.owner as Lay...
来源: Laya_社区 发布时间: 20201012