大约有 35 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0029 秒)
...的销毁而一起销毁。这些残留下的资源需要分别使用`Laya.loader.getRes(url:String)`接口获取到资源(Resource)对象之后,再调用资源对象的`destroy()`方法进行销毁。但是这种方法是非常麻烦的。LayaAir2.0为了方便开发者,提供了`Resource.d...
来源: Laya2.0_文档 发布时间: 20210715
...的销毁而一起销毁。这些残留下的资源需要分别使用`Laya.loader.getRes(url:String)`接口获取到资源(Resource)对象之后,再调用资源对象的`destroy()`方法进行销毁。但是这种方法是非常麻烦的。LayaAir2.0为了方便开发者,提供了`Resource.d...
来源: Laya2.0_文档 发布时间: 20210715
...的销毁而一起销毁。这些残留下的资源需要分别使用`Laya.loader.getRes(url:String)`接口获取到资源(Resource)对象之后,再调用资源对象的`destroy()`方法进行销毁。但是这种方法是非常麻烦的。LayaAir2.0为了方便开发者,提供了`Resource.d...
来源: Laya2.0_文档 发布时间: 20210715
...源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(Res,Handler.create(this,graphicsImg)); } private function graphicsImg():void { img = new Sprite(); //获取图片资源,绘制到画布 img.graphics.drawTexture(Laya.loader.getRes(Res),150,50); //添加到舞台...
来源: Laya2.0_文档 发布时间: 20210714
...源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(Res,Handler.create(this,graphicsImg)); })(); function graphicsImg() { img = new Sprite(); //获取图片资源,绘制到画布 img.graphics.drawTexture(Laya.loader.getRes(Res),150,50); //添加到舞台 Laya.sta...
来源: Laya2.0_文档 发布时间: 20210715
...源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(this.Res,Laya.Handler.create(this,this.graphicsImg)); } private graphicsImg():void{ this.img = new Laya.Sprite(); //获取图片资源,绘制到画布 this.img.graphics.drawTexture(Laya.loader.getRes(this.Res),1...
来源: Laya2.0_文档 发布时间: 20210715
...n; import laya.display.Stage; import laya.maths.Rectangle; import laya.net.Loader; import laya.utils.Browser; import laya.utils.Handler; import laya.webgl.WebGL; public class HelloLayabox { private const AniConfPath:String = "../../../../res/role.atlas"; private var roleAni:Animation; public functio...
来源: Laya2.0_文档 发布时间: 20210715
...ER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load([texture1, texture2], Handler.create(this, onAssetsLoaded)); })(); function onAssetsLoaded() { ape = new Sprite(); Laya.stage.addChild(ape); ape.pivot(55, 72); ape.pos(200, 200); // 显示默认纹理 switchTextur...
来源: Laya2.0_文档 发布时间: 20210715
...ER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#ffffff"; Laya.loader.load([this.texture1, this.texture2], Handler.create(this, this.onAssetsLoaded)); } private onAssetsLoaded(): void { this.ape = new Sprite(); Laya.stage.addChild(this.ape); this.ape.pivot(55, 72); this.ape.pos(100,50); ...
来源: Laya2.0_文档 发布时间: 20210715
...HOWALL; //背景颜色 Laya.stage.bgColor = "#232628"; //加载资源 Laya.loader.load(["../../../../res/ui/progressBar.png", "../../../../res/ui/progressBar$bar.png"], Handler.create(this, onLoadComplete)); } /***加载资源完成***/ private function onLoadComplete():void { //实例化进度条 p...
来源: Laya2.0_文档 发布时间: 20210715