大约有 580 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0052 秒)
Laya_社区(372) Laya2.0_文档(74) Laya_示例(51) Laya2.0_示例(39) Laya3.0_文档(34) Laya3.0_api(8) Laya2.0_api(2)
...件均已创建完毕,此方法只执行一次 */ onAwake(): void { Laya.loader.load(this.skins).then(() => { this.onCheckBoxSkinLoaded(); }); } private onCheckBoxSkinLoaded(e: any = null): void { let cb: Laya.CheckBox; for (let i: number = 0; i < this.COL_AMOUNT; ++i) { for (let j: number =...
来源: Laya3.0_文档 发布时间: 20251010
...的示例代码为: ```typescript //atlas方式图集使用示例 Laya.loader.load("./res/atlas/test.atlas", Handler.create(this, onLoaded)); ``` `.json`是一种兼容第三方的图集配置方式,由于`.json`文件应用广泛,不仅仅用于图集,所以为了识别是否为图集配置...
来源: Laya2.0_文档 发布时间: 20210714
获取图片资源出错,求大神解答,附代码 用Laya.loader.load获取res文件夹下的.png图片,出错,报错信息为:Uncaught TypeError: Cannot read property 'create' of undefined 附件 : --> LayaAir.zip 2017-03-31 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...
来源: Laya_社区 发布时间: 20170331
...提前设置 assets = ["res/ui/dialog (1).png", "res/ui/close.png"]; Laya.loader.load(assets, Handler.create(this, onSkinLoadComplete)); } private function onSkinLoadComplete(e:*=null):void { var dialog:Dialog = new Dialog(); var bg:Image = new Image(assets[0]); dialog.addChild(bg); var button:Butto...
来源: Laya_社区 发布时间: 20170706
...olor = "#101825"; this.init() } init() { // 预加载图集 Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, this.onLoaded ), null, Laya.Loader.ATLAS) } onLoaded(){ Laya.stage.addChild(new TopUI()) Laya.stage.addChild(new TabUI()) this.getGold.on(Laya.Event.MOUS...
来源: Laya_社区 发布时间: 20171213
...a.stage.scaleMode = 'exactfit'; Laya.stage.screenMode = 'horizontal'; Laya.loader.load(['res/atlas/view.atlas'], Handler.create(this, initGame)); Laya.timer.frameOnce(1, this, function () { Laya.stage.on(Event.RESIZE, this, function () { window.location.reload(); }) }) 2018-04-16 添加评论 免费...
来源: Laya_社区 发布时间: 20180416
...白求助,关于时间轴动画如何设置播放一次后消失? Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, onLoaded)); function onLoaded() { var tl = new Laya.Animation(); tl.loadAnimation("democesi.ani"); Laya.stage.addChild(tl); tl.play(); tl.pos(302,650); } 2018-01-1...
来源: Laya_社区 发布时间: 20180117
...ueying 赞同来自: package { import laya.display.Sprite; import laya.net.Loader; import laya.ui.Panel; import laya.utils.Handler; public class LayaAirDemo { public function LayaAirDemo() { Laya.init(600,600); Laya.stage.bgColor='#EEFFCC'; Laya.loader.load("res/atlas/comp.json",Handler.create(this,...
来源: Laya_社区 发布时间: 20170719
... this.init(); } init():void{ Laya.init(800, 700, Laya.WebGL); Laya.loader.load("res/atlas/images.atlas",Laya.Handler.create(this,this.onLoaded),null,Laya.Loader.ATLAS); } onLoaded(){ console.info("onLoaded"); this.tiledMap = new Laya.TiledMap(); this.tiledMap.createMap("desert.js...
来源: Laya_社区 发布时间: 20171125
...; //设置背景颜色 Laya.stage.bgColor = "#ffcccc"; //加载资源 Laya.loader.load("res/atlas/comp.atlas",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS) })(); function onLoaded(){ //实例化 var tempBG=new background(); Laya.stage.addChild(tempBG); } })();在background.js里是这...
来源: Laya_社区 发布时间: 20180129