大约有 398 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0058 秒)
Laya_社区(315) Laya2.0_文档(29) Laya3.0_api(21) Laya3.0_文档(17) Laya2.0_示例(7) Laya_示例(5) laya_api(2) Laya2.0_api(2)
... Texture; set texture(value: Texture); 我们来看看代码示例: Laya.loader.load("atlas/comp/image.png").then(() => { let sprite = new Laya.Sprite(); //精灵设置纹理并居中显示 let res = Laya.loader.getRes("atlas/comp/image.png"); sprite.pos(Laya.stage.width >> 1, Laya.stage....
来源: Laya3.0_文档 发布时间: 20251010
...下: ```typescript //先加载plf类型的合并后文件Image.json Laya.loader.load([{url: "res/Image.json", type: "plf"}], Handler.create(this, function():void { //在回调里,正常使用原来的图集 Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, function():void { var img:T...
来源: Laya2.0_文档 发布时间: 20210714
...@regClass() export class Main extends Laya.Script { onAwake(): void { Laya.loader.load(["resource/AtlasConfig.atlas"], Laya.Handler.create(this, () => { let img = new Laya.Image; Laya.stage.addChild(img); img.pos(500, 100); img.skin = "resources/img_bg.png"; //图集中的图片 })); } onStart() ...
来源: Laya3.0_文档 发布时间: 20251010
...在构建发布配置项里手动添加为始终包含的资源目录 Laya.loader.load("resources/aaa/test.atlas").then(() => {//更多资源加载方式,可查看《资源加载》文档 this.owner.skin = "resources/aaa/image.png"; //将图集路径+名称视为小图的资源目录,小图...
来源: Laya3.0_文档 发布时间: 20251128
...用后执行,例如节点被添加到舞台后 onEnable(): void { Laya.loader.load("resources/layabox.png", Laya.Loader.IMAGE).then(() => { this.setMesh2DRender(); }); } // 配置2D网格渲染器 setMesh2DRender(): void { let mesh2Drender = this.layaMonkey.getComponent(Laya.Mesh2DRender); // ...
来源: Laya3.0_文档 发布时间: 20251120
...载建筑图片 private loadBuildingImage(): void { Laya.loader.load( "res/building.png", // 你的建筑图片路径 Laya.Handler.create(this, () => { // 加载完成后绘制到building Sprite上 ...
来源: Laya_社区 发布时间: 20251125
...。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 Laya.loader.load("resource/ui/btn_close.png", Handler.create(this, onLoadComplete));//加载资源。 } private function onLoadComplete():void { dialog = new Dialog_Instance();//创建一个 Dialog_Instance 类的实例对象 dialog...
来源: Laya3.0_api 发布时间: 20231115
... text_info = cell.getChildByName("text_des") as Laya.Text; let i18n = Laya.loader.getRes("config/i18n.json"); text_info.text = i18n[`tips_text$text_i18n$${1101 + index}`][ConfigInfo.lang] } public setCurPage(index: number) { if (this.m_index != index) { for (let i = 1; i < 7; i++) { let skin = "u...
来源: Laya_社区 发布时间: 20171202
... text_info = cell.getChildByName("text_des") as Laya.Text; let i18n = Laya.loader.getRes("config/i18n.json"); text_info.text = i18n[`tips_text$text_i18n$${1101 + index}`][ConfigInfo.lang] } public setCurPage(index: number) { if (this.m_index != index) { for (let i = 1; i < 7; i++) { let skin = "u...
来源: Laya_社区 发布时间: 20181112
...nt.__proto.parseFont (http://127.0.0.1:61385/game/code.js:803:17) at Loader.__proto.onLoaded (http://127.0.0.1:61385/game/code.js:12700:11) at HTMLImage.onload (http://127.0.0.1:61385/game/code.js:21213:15) at Image._source._source.onload (http://127.0.0.1:61385/game/code.js:20175:...
来源: Laya_社区 发布时间: 20180306