大约有 134 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0035 秒)
Laya_社区(98) Laya2.0_文档(19) Laya3.0_文档(11) Laya3.0_api(2) Laya2.0_api(2) Laya2.0_示例(1) Laya_示例(1)
...ray = [{url : "games/game_13/shakeask_bg.jpg"}, {url : "res/atlas/games/game_13/image.atlas"} ]; Laya.loader.load(loadArray, Handler.create(null, ()=>{ this.uiView = new SharkItOff(); Laya.stage.addChild(this.uiView); })); 先加载图集,图集加载完再new一个界面。...
来源: Laya_社区 发布时间: 20180327
...ath加载图集到我的网络地址这样写对吗 Laya.loader.load(["res/atlas/comp.atlas"]); Laya.URL.basePath="http://192.168.6.143:8080"; 2018-12-11 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_Aaron ...
来源: Laya_社区 发布时间: 20181211
...; } } } // 程序入口 Laya.init(600, 400); Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Handler.create(this, this.onLoaded)); function onLoaded(): void { //示例UI界面 var testUI: TestUI = new TestUI(); Laya.stage.addChild(testUI); }// TestView.as package { import game...
来源: Laya_示例 发布时间: 20240929
...; } } } // 程序入口 Laya.init(600, 400); Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Handler.create(this, this.onLoaded)); function onLoaded(): void { //示例UI界面 var testUI: TestUI = new TestUI(); Laya.stage.addChild(testUI); }// TestView.as package { import game...
来源: Laya2.0_示例 发布时间: 20200319
... { Laya.init(600,600); Laya.stage.bgColor='#EEFFCC'; Laya.loader.load("res/atlas/comp.json",Handler.create(this,onLoaded),null,Loader.ATLAS); } private function onLoaded():void { //panel 切记设置宽高,否则panel不显示 var panel:Panel=new Panel(); panel.size(300,300); panel.pos(100,100); p...
来源: Laya_社区 发布时间: 20170719
...bitmap属性上锁。 ```js init() { //加载场景 Laya.loader.load('res/atlas/comp.atlas',Laya.Handler.create(this,this.onComplete)); } onComplete(){ //获取图集中的一个单图 var a = Laya.loader.getRes('comp/button.png'); //通过单图的bitmap对图集加锁 a.bitmap.lock = true; } ```
来源: Laya2.0_文档 发布时间: 20210715
...: 问题已经找到了,是UI编辑器F12导出的时候打包的大图是atlas后缀格式造成的,而默认例子里面加载的是json格式的: Laya.loader.load("res/atlas/comp.json", Handler.create(this, onAssetLoaded), null, Loader.ATLAS); 所有导致了图集位置错乱,麻烦技术修...
来源: Laya_社区 发布时间: 20171110
...script private function init():void { //加载场景 Laya.loader.load('res/atlas/comp.atlas',Handler.create(this,onComplete)); } private function onComplete():void{ //获取图集中的一个单图 var a:Texture = Laya.loader.getRes('comp/button.png'); //通过单图的bitmap对图集加锁 a.bitmap...
来源: Laya2.0_文档 发布时间: 20210715
...//加载图集成功后,执行onLoaded回调方法 Laya.loader.load("res/atlas/comp.atlas",Laya.Handler.create(this,this.onLoaded)); } private onLoaded():void{ //创建一个UI实例 this.comp = new ui.ComponentDemoUI(); //添加到舞台上显示 Laya.stage.addChild(this.comp); //点击Tab选择...
来源: Laya2.0_文档 发布时间: 20210715
...width,Browser.height); Laya.stage.bgColor="#EEFFCC"; Laya.loader.load("res/atlas/comp.json",Handler.create(this,onLoaded),null,Loader.ATLAS); } private function onLoaded():void { list=new List(); Laya.stage.addChild(list); list.itemRender=Item; list.repeatX=1; list.repeatY=6; list.x=((Laya.stage.wid...
来源: Laya_社区 发布时间: 20170626