大约有 418 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0044 秒)
...es/monkey1.png','apes/monkey2.png','apes/monkey3.png'],Handler.create(this,onLoaded)); } private function onLoaded():void { //获取纹理 var texture1:Texture=Loader.getRes('apes/monkey0.png') as Texture; var texture2:Texture=Loader.getRes('apes/monkey1.png') as Texture; var texture3:Texture=Loader...
来源: Laya_社区 发布时间: 20170519
...gend/map.jpg"]; Laya.loader.load(urls, Laya.Loader.IMAGE, this.onLoading).then(() => { this.onAssetLoaded(); }); // 侦听加载失败 Laya.loader.on(Event.ERROR, this, this.onError); } private onAssetLo...
来源: Laya_社区 发布时间: 20240705
...a.Handler.create(this, this.onAssetLoaded), Laya.Handler.create(this, this.onLoading));` 在上面的代码中,使用`Laya.Handler.create(this,this.onLoading)`返回的回调方法,是要处理progress加载进度事件,由于回调执行一次之后就被对象池回收了,所以,progress...
来源: Laya2.0_文档 发布时间: 20210715
...(); mBitmapFont.loadFont("res/bitmapFont/test.fnt", new Laya.Handler(this, onLoaded)); function onLoaded(){ mBitmapFont.setSpaceWidth(10); Laya.Text.registerBitmapFont(mFontName,mBitmapFont); let txt = new Laya.Text(); txt.text='手机号 +86'; txt.color='#FFFFFF'; txt.font = mFontName;//===========...
来源: Laya_社区 发布时间: 20191108
...r.load(urls, Handler.create(this, onAssetLoaded), Handler.create(this, onLoading)); ``` 在上面的代码中,使用`Handler.create(this, onLoading)`返回的回调方法,是要处理progress加载进度事件,由于回调执行一次之后就被对象池回收了,所以,progress加...
来源: Laya2.0_文档 发布时间: 20210715
...载动画所需的图集。 ```javascript //加载图集成功后,执行onLoaded回调方法 Laya.loader.load("res/atlas/ui.atlas", Laya.Handler.create(this, onLoaded)); ``` 第二步:创建Animation实例,加载动画文件 ```javascript //创建一个Animation实例 var tl = new Laya.Animati...
来源: Laya2.0_文档 发布时间: 20210715
...mo() { Laya.init(800,800); Laya.loader.load('logo.png',Handler.create(this,onLoaded)); } private function onLoaded():void { var texture:Texture=Loader.getRes('logo.png'); var sp:Sprite=new Sprite(); sp.graphics.clear();//把上次的绘制清除 sp.graphics.drawTexture(texture); Laya.stage.addChild(...
来源: Laya_社区 发布时间: 20170505
...,onFireFox的判断laya2去掉了, 我自己从laya1找回来; var onload = function (imageData) { clear(); if (imageData) { var image = imageData; if (type !== "nativeimage") { ...
来源: Laya_社区 发布时间: 20210629
...l: "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); console.log("myref-onloaded", testUI.myref.getBounds()); console.log("mypan-onloaded", testUI.mypan.getB...
来源: Laya_社区 发布时间: 20170720
... Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Handler.create(this,onLoaded)); } private function onLoaded():void { var sp:Sprite=new Sprite(); sp.loadImage('bg.png'); Laya.stage.addChild(sp); }在地图加载完成的回调里去加新的显示对象,是addChild地图之上的! 2017-05-...
来源: Laya_社区 发布时间: 20170526