大约有 1,772 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0060 秒)
Laya_社区(1393) laya_api(90) Laya3.0_api(82) Laya2.0_api(72) Laya2.0_文档(59) Laya_示例(33) Laya2.0_示例(32) Laya3.0_文档(11)
...createSprtie() { const w = 50; const h = 30; button = new Sprite(); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.pivot(w / 2, h / 2); //设置宽高(要接收鼠标事件必须设置宽高,否则不会被命中) button.size(w, h); button.x = (Laya.stage.width - TrackLength) / 2; but...
来源: Laya_示例 发布时间: 20251209
...t: Texture = Laya.loader.getRes("load/0.png"); this.darwSprite.graphics.drawTexture(t,0,0); this.darwSprite.graphics.drawTexture(t,176,0); this.darwSprite.graphics.drawTexture(t,176*2,0); 采用这方式在sprite内部绘制了3个一样的png,每一个宽度...
来源: Laya_社区 发布时间: 20160718
...prite(); this.bar = new Sprite(); this.bar.x = 15; this.bar.y = 2; this.bg.graphics.drawTexture(texture1, 0, 0, 180, 21); this.bar.graphics.drawTexture(texture2, 0, 0, 155, 12); this.addChild(this.bg); this.addChild(this.bar); } /** * 修改当前状态 */ _proto.changeValue = function(value){ this....
来源: Laya_社区 发布时间: 20160803
...定的路径数据绘制出图案均可使用LayaAir引擎中laya.display.Graphics类的“drawpoly();”方法实现。该方法的详细说明如下图所示:  (图1) ### 一、绘制三角形 下面我们用LayaAir引擎先绘制一个三角形,示例代码...
来源: Laya2.0_文档 发布时间: 20210715
...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_示例 发布时间: 20251209
...Event; const w = 50; const h = 30; this.button = new Sprite(); this.button.graphics.drawRect(0, 0, w, h, "#FF7F50"); this.button.pivot(w / 2, h / 2); //设置宽高(要接收鼠标事件必须设置宽高,否则不会被命中) this.button.size(w, h); this.button.x = (Laya.stage.width - TrackL...
来源: Laya2.0_示例 发布时间: 20251209
...定的路径数据绘制出图案均可使用LayaAir引擎中laya.display.Graphics类的“drawpoly();”方法实现。该方法的详细说明如下图所示:  (图1) ### 一、绘制三角形 下面我们用LayaAir引擎先绘制一个三角形,示例代码...
来源: Laya2.0_文档 发布时间: 20210714
...ogressBar 第一个问题: UI下的skin是组件的皮肤,graphics.draw是draw的图片纹理 如果UI的组件为Image,更换Image的Skin和graphics.draw一张图片纹理效果是一样的 如果UI的组件为button等有点击状态的组件时,更...
来源: Laya_社区 发布时间: 20160729
...定的路径数据绘制出图案均可使用LayaAir引擎中laya.display.Graphics类的“drawpoly();”方法实现。该方法的详细说明如下图所示:  (图1) ### 一、绘制三角形 下面我们用LayaAir引擎先绘制一个三角形,示例代码...
来源: Laya2.0_文档 发布时间: 20210714
...Laya.loader.load([this.monkey1,this.monkey2],Laya.Handler.create(this,this.graphicsImg)); } private graphicsImg():void{ //创建一个实例 this.img = new Laya.Sprite(); //添加到舞台 Laya.stage.addChild(this.img); //显示初始化绘制的图片 this.switchImg();...
来源: Laya_社区 发布时间: 20180226