大约有 371 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0070 秒)
...正确获取宽高。 1. **直接调用size设置:** ```javascript Laya.loader.load("res/apes/monkey2.png",Handler.create(this,function() { var texture=Laya.loader.getRes("res/apes/monkey2.png"); var sp=new Laya.Sprite(); sp.graphics.drawTexture(texture,0,0); sp.size(texture.width,texture.height);...
来源: Laya2.0_文档 发布时间: 20210715
...资源加载完运行过回调函数以后再进行。如下句 : Laya.loader.create( MyResouces.arrResources, Handler.create(this,onLoadComplete) ); 意为加载完MyResouces.arrResources这些资源后调用方法onLoadComplete,添加碰撞盒子需要在onLoadComplete里或者onLoadComplete...
来源: Laya_社区 发布时间: 20181012
...下: ```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
...pleteHandler:Handler):void { this._completeHandler = completeHandler; Laya.loader.load('test.txt',Handler.create(this, onloaded)); } private function onloaded():void { trace('B',_completeHandler.method == null,_completeHandler['_id']) _completeHandler.run(); } } } 附件 : --> testlaya.rar 2017-03-3...
来源: Laya_社区 发布时间: 20170330
... ```javascript //加载图集成功后,执行onLoaded回调方法 Laya.loader.load("res/atlas/ui.atlas", Laya.Handler.create(this, onLoaded)); ``` 第二步:创建Animation实例,加载动画文件 ```javascript //创建一个Animation实例 var tl = new Laya.Animation(); //加载动画文件 ...
来源: Laya2.0_文档 发布时间: 20210715
...HOWALL; //背景颜色 Laya.stage.bgColor = "#232628"; //加载资源 Laya.loader.load(this.skins, Handler.create(this, this.onSkinLoadComplete)); } /***加载资源完成***/ private onSkinLoadComplete(e:any=null):void { //创建水平滚动条 this.createHScroller(); } /***创建水平滚动条***...
来源: Laya2.0_文档 发布时间: 20210715
...HOWALL; //背景颜色 Laya.stage.bgColor = "#232628"; //加载资源 Laya.loader.load(this.skins, Handler.create(this, this.onSkinLoadComplete)); } /***加载资源完成***/ private onSkinLoadComplete(e:any=null):void { //创建垂直滚动条 this.createVScroller(); } /***创建水平滚动条***...
来源: Laya2.0_文档 发布时间: 20210715
... ```typescript //加载图集成功后,执行onLoaded回调方法 Laya.loader.load("res/atlas/ui.atlas",Laya.Handler.create(this,this.onLoaded)); ``` 第二步:创建Animation实例,加载动画文件 ```typescript //创建一个Animation实例 var tl:Laya.Animation = new Laya.Animation(); //...
来源: Laya2.0_文档 发布时间: 20210715
...最后回到原大小或原位置,应该用什么缓动模式 请问下loader如何强制加载一个文件,避免浏览器的缓存 请问layaide如何创建一个复合的Button 问题状态 最新活动: 2024-01-10 16:20 浏览: 2186 关注: 2 人 Heured • 2024-01-10 18:10 那如果把清...
来源: Laya_社区 发布时间: 20240109
...图集。 ```java //加载图集成功后,执行onLoad回调方法 Laya.loader.load("res/atlas/ui.atlas", Handler.create(this, onLoaded)); ``` 第二步:创建Animation实例,加载动画文件 ```java //创建一个Animation实例 var tl:Animation = new Animation(); //加载动画文件 tl.lo...
来源: Laya2.0_文档 发布时间: 20210715