大约有 744 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0057 秒)
Laya_社区(536) Laya2.0_文档(76) Laya_示例(48) Laya2.0_示例(39) Laya3.0_文档(24) Laya3.0_api(19) laya_api(1) Laya2.0_api(1)
..., offset || Point.EMPTY, color)); else return null; } 代码示例: Laya.loader.load("resources/layaAir.png").then((res: Laya.Texture) => { let sp = new Laya.Sprite(); // 绘制填充纹理 sp.graphics.fillTexture(res, 0, 0, 500, 500, "repeat"); this.owner.addChild(sp); }); 运行效果: (...
来源: Laya3.0_文档 发布时间: 20251010
...HOWALL; //背景颜色 Laya.stage.bgColor = "#232628"; //加载资源 Laya.loader.load(this.skins, Handler.create(this, onSkinLoadComplete)); /***加载资源完成***/ function onSkinLoadComplete(e) { //创建水平滚动条 createHScroller(); } /***创建水平滚动条***/ function createHScrolle...
来源: Laya2.0_文档 发布时间: 20210714
...HOWALL; //背景颜色 Laya.stage.bgColor = "#232628"; //加载资源 Laya.loader.load(this.skins, Handler.create(this, onSkinLoadComplete)); /***加载资源完成***/ function onSkinLoadComplete(e) { //创建垂直滚动条 createVScroller(); } /***创建水平滚动条***/ function createVScrolle...
来源: Laya2.0_文档 发布时间: 20210715
...; //加载图集资源,加载成功后将UI界面添加到舞台上 Laya.loader.load("./res/atlas/comp.atlas",Laya.Handler.create(this,onLoaded)); function onLoaded(){ //实例化导出的UI类 var efc = new ui.TestPUI(); //添加到舞台 Laya.stage.addChild(efc); } ``` 运行后,按钮被按...
来源: Laya2.0_文档 发布时间: 20210715
...HOWALL; //背景颜色 Laya.stage.bgColor = "#232628"; //加载资源 Laya.loader.load(skin, Handler.create(this, onLoadComplete)); } /***加载资源完成***/ private function onLoadComplete(e:*=null):void { //实例化下拉列表 comboBox= new ComboBox(skin, "item0,item1,item2,item3,item4,item5"...
来源: Laya2.0_文档 发布时间: 20210714
...; //加载图集资源,加载成功后将UI界面添加到舞台上 Laya.loader.load("./res/atlas/ui.atlas",Laya.Handler.create(this,this.onLoaded)); } private onLoaded():void{ //实例化导出的UI类 var efc:ui.EffectAnimationDemoUI = new ui.EffectAnimationDemoUI(); //添加到舞台 Laya.stage...
来源: Laya2.0_文档 发布时间: 20210715
...g/btn_test.png"; //加载资源成功后,执行onLoaded回调方法 Laya.loader.load(skin,Laya.Handler.create(this,onLoaded)); function onLoaded(){ //创建一个Button实例 var btn = new Laya.Button(skin); //将Button添加到舞台上 Laya.stage.addChild(btn); //设置Button相关属性 btn.wid...
来源: Laya2.0_文档 发布时间: 20210714
...", "vslider$bar.png");//图片资源来自“引擎API使用示例” Laya.loader.load(skins, Laya.Handler.create(this, this.placeVSlider)); } private placeVSlider(): void { let vs: Laya.Slider = new Laya.VSlider(); vs.skin = "vslider.png"; vs.height = 300; vs.pos(400, 50); vs.min = 0; vs.max = 100;...
来源: Laya3.0_文档 发布时间: 20251010
...渲染效果 alpha遮罩 用法: var texture: Laya.Texture = Laya.Loader.getRes("progress.png"); this.spe = new coolDownSprite(); this.spe.init(texture); //this.spe.initWithoutTexture(128, 128); this.spe.pos(300, 350); this.spe.setProgress(this.progress); Laya.stage.addChild(this.spe); -----...
来源: Laya_社区 发布时间: 20170606
...", "hslider$bar.png");//图片资源来自“引擎API使用示例” Laya.loader.load(skins, Laya.Handler.create(this, this.placeHSlider)); } private placeHSlider(): void { let hs: Laya.Slider = new Laya.HSlider(); hs.skin = "hslider.png"; hs.width = 300; hs.pos(50, 500); hs.min = 0; hs.max = 100; ...
来源: Laya3.0_文档 发布时间: 20251010