大约有 165 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0047 秒)
Laya_社区(134) Laya2.0_文档(13) Laya2.0_示例(6) Laya_示例(3) Laya3.0_文档(3) laya_api(2) Laya3.0_api(2) Laya2.0_api(2)
...ative模式下,使用 var protocols = Laya.Utils.parseXMLFromString(Laya.loader.getRes(url)).firstChild;这样的方式,可以获取到xml对象,调用protocols.children.length没有问题。但是在native模式下。获取出来的对象调用protocols.children.length出错。说是protocols...
来源: Laya_社区 发布时间: 20180703
...cs.clear(); var t: Laya.Texture = Laya.loader.getRes("puzzlePic/pi-" +this.levelNum +"-"+this.owner.name.slice(4,1)+ "-2.png"); (this.owner as Laya.Sprite).graphics.drawTexture(t,0,0); 2020-10-12 0 0 分享 微博 QZONE 微...
来源: Laya_社区 发布时间: 20201012
...0 0 分享 微博 QZONE 微信 liwenhua 赞同来自: this.linkJson = Laya.loader.getRes('res/json/linkUrl.json');这样读取出来不就是就对象了吗,怎么设置编码格式啊??不会啊!!!我都是这样引用,然后直接this.linkJson.XXX进行读取的,如果数值都都...
来源: Laya_社区 发布时间: 20180115
..."; var asset = []; asset.push({ url: ["../res/image/bg.png"], type: Laya.Loader.IMAGE }); Laya.loader.load(asset,Laya.Handler.create(this,graphicsImg)); function graphicsImg(){ var s = new laya.display.Sprite(); s.graphics.drawTexture(Laya.loader.getRes("../res/image/bg.png"),0,0); Laya.stage.ad...
来源: Laya_社区 发布时间: 20180808
...=================================================== // 程序入口 import Loader = Laya.Loader; import Texture = Laya.Texture; import Handler = Laya.Handler; class GameMain{ constructor() { Laya.init(1080,1321); //设置适配模式 Laya.stage.scaleMode = "showall"; //设置剧中对齐 Laya.stage....
来源: Laya_社区 发布时间: 20170329
...源加载成功后,通过回调方法绘制图片并添加到舞台 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
... let pngUrl = texture.realTexture.url; let res = Laya.loader.getRes(pngUrl); if (res && res._bitmap instanceof Laya.Texture2D) { res._bitmap.destroy(); } Laya.loader.clearRes(pngUrl) } } tmpDat.d...
来源: Laya_社区 发布时间: 20240429
...文档的例子试了不行 // 程序入口 module laya { import Loader = Laya.Loader; import Handler = Laya.Handler; export class Loader_MultipleType { private ROBOT_DATA_PATH: string = "res/swf/star.swf"; private ROBOT_DATA_PATHS: string = "res/swf/star.json...
来源: Laya_社区 发布时间: 20180203
...调。这个是异步获取,如果你要单个获取的话 window.Laya.loader.load(value.url, ls.Handler.create(this, function () { _this.graphics.clear() var texture = window.Laya.loader.getRes(value.url) _this.graphics.drawTexture(texture) _this.scaleX = _this.set_width / texture.sourceWidth _th...
来源: Laya_社区 发布时间: 20180530