大约有 735 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0051 秒)
Laya_社区(530) Laya2.0_文档(76) Laya_示例(48) Laya2.0_示例(39) Laya3.0_文档(21) Laya3.0_api(19) laya_api(1) Laya2.0_api(1)
...法,AS/TS思路一样,请根据自己的需求进行修改即可!var Loader = laya.net.Loader; var Handler = laya.utils.Handler; var Event = laya.events.Event; // 创建TestPageUI的子类 function TestUI() { TestUI.super(this); //list赋值,先获得一个数据源数组 var arr = ; for (va...
来源: Laya_社区 发布时间: 20170513
... number = 1188; static height: number = 594; constructor() { super(); Laya.loader.load("res/images/map_01.png", Laya.Handler.create(this, this.bgLoaded)); } bgLoaded(): void { let t: Laya.Texture = Laya.loader.getRes("res/images/map_01.png"); this.width = 1000; this.height = 500; this.graphics.fillT...
来源: Laya_社区 发布时间: 20170714
...错 Uncaught TypeError: this.setTo is not a function(function () { const Loader = Laya.Loader const Handler = Laya.Handler (function () { Laya.init(1136,640) Laya.stage.bgColor="#fff" Laya.loader.load('./../bin/res/atlas/res.atlas', Handler.create(this, onLoaded)) })() function onLoaded() { var cMa...
来源: Laya_社区 发布时间: 20180810
...此方法只执行一次 */ onAwake(): void { //小游戏加载分包 Laya.loader.loadPackage("sub1", this.printProgress).then(() => { Laya.loader.load("sub1/Cube.lh").then((res: Laya.PrefabImpl) => { let sp3: Laya.Sprite3D = res.create() as Laya.Sprite3D; this.scene3d.addChild(sp3); }); }) La...
来源: Laya3.0_文档 发布时间: 20240528
...Laya.Stage.ALIGN_CENTER; Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; Laya.loader.load("res/img/m1.jpg",Laya.Handler.create(this,load)); function load(){ let ctn2=new Laya.Sprite(); Laya.stage.addChild(ctn2); var gq=new Laya.Sprite(); gq.loadImage("res/img/m1.jpg",100,100,100,100); ctn2.addChild(...
来源: Laya_社区 发布时间: 20180806
...Laya.View.regComponent("ScaleButton", ScaleButton); Laya.loader.load("res/atlas/com/loading.atlas", Laya.Handler.create(this, this.loadGame)); } private loadGame(): void { var resArray = [ { url: "res/atlas/lobby/cre...
来源: Laya_社区 发布时间: 20181213
... [error] Undefined class: ani 这是我哪里用的不对吗? Laya.loader.load("res/1.json", Handler.create(this, createAnimation), null, Loader.ATLAS); public function createAnimation():void { var appendHtml:HTMLDivElement=new HTMLDivElement(); ...
来源: Laya_社区 发布时间: 20180309
... // 程序入口 class GameMain{ constructor() { Laya.init(1280,720); Laya.loader.load([{url:"res/atlas/comp.json",type:Laya.Loader.ATLAS}],Laya.Handler.create(this,this.loaded,null)); } private loaded():void{ var img:Laya.Image = new Laya.Image(); img.skin = "comp/img_pro.png"; Laya.stage.addChild(...
来源: Laya_社区 发布时间: 20170327
...Laya.View.regComponent("ScaleButton", ScaleButton); Laya.loader.load("res/atlas/com/loading.atlas", Laya.Handler.create(this, this.loadGame)); } private loadGame(): void { var resArray = [ { url: "res/atlas/lobby/cre...
来源: Laya_社区 发布时间: 20181202
...; //设置stage颜色s Laya.stage.bgColor = "#ffffff"; //加载资源 Laya.loader.load("res/atlas/comp.json",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS) })(); function onLoaded(){ var _start = new start(); Laya.stage.addChild(_start); } })(); var start = (function(_super){ function st...
来源: Laya_社区 发布时间: 20181220