大约有 779 项符合查询结果, 库内数据总量为 31,624 项。 (搜索耗时: 0.0056 秒)
..."; 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
...源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(this.monkey2,Laya.Handler.create(this,graphicsImg)); function graphicsImg(){ var img = new Laya.Sprite(); //获取图片资源,绘制到画布 img.graphics.drawTexture(Laya.loader.getRes(this.monkey2),100,50); /...
来源: Laya_社区 发布时间: 20170825
...as/ui.atlas"}, {res:"res/ui/back.png",type:Loader.IMAGE} ]; Laya.loader.load(resArr,Handler.create(this,this.onLoaded)); } private function onLoaded():void{ //显...
来源: Laya_社区 发布时间: 20180106
...itmap || this._bitmap.destroyed)&& url){ Laya.loader.load(url,Handler.create(this,function(bitmap){ _$this._bitmap=bitmap; }),null,"htmlimage",1,false,null,true); } } Laya.loader.load的cache参数...
来源: Laya_社区 发布时间: 20190311
...成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load([this.monkey1,this.monkey2],Laya.Handler.create(this,this.graphicsImg)); } private graphicsImg():void{ //创建一个实例 this.img = new Laya.Sprite(); //添加到舞台 Laya.stage.addChild(th...
来源: Laya_社区 发布时间: 20180226
...scaleMode = Laya.Stage.SCALE_NOSCALE; // Laya.stage.size(6000, 6000); Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Laya.Handler.create(this, this.onLoaded)); function onLoaded(): void { var sprite = new Laya.Sprite(); sprite.loadImage('comp/bg.png'); Laya.stage.addChild(spr...
来源: Laya_社区 发布时间: 20170803
...: // 程序入口 class GameMain{ constructor(){ var Loader = Laya.Loader; var Browser = Laya.Browser; var Handler = Laya.Handler; var ProtoBuf = Browser.window.protobuf; Laya.init(550, 400); //加载协议...
来源: Laya_社区 发布时间: 20170216
... var completeFunc = (scene)=>{ var sc = Laya.loader.getRes(sceneUrl); Laya.stage.addChild(sc); } Laya.loader.create(sceneUrl,new Laya.Handler(this,completeFunc)); 附件 : --> scene1.zip 2019-10-12 添加评论...
来源: Laya_社区 发布时间: 20191012
... 代码: var ress=[{url:"res/atlas/games/cxmj/shaizi.json",type:Laya.Loader.ATLAS}]; Laya.loader.load(ress); var Animation = Laya.Animation; var dice=new Animation(); ...
来源: Laya_社区 发布时间: 20170105
...bgColor = "#ff0000"; Laya.stage.scaleMode = "fixedwidth"; Laya.loader.load("http://localhost/layabox/layabox/layabox/res/bg.png'", Handler.create(this, function () { var t = Laya.loader.getRes(skin); var _sprite = new Sprite(); _sprite.graphics.drawTex...
来源: Laya_社区 发布时间: 20170222