大约有 520 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0088 秒)
...载资源成功后,执行onLoaded回调方法 Laya.loader.load(skin,Laya.Handler.create(this,onLoaded)); function onLoaded(){ //创建一个Button实例 var btn = new Laya.Button(skin); //将Button添加到舞台上 Laya.stage.addChild(btn); //设置Button相关属性 btn.width = 100; btn.height =...
来源: Laya2.0_文档 发布时间: 20210714
...//加载引擎需要的资源 Laya.loader.load("res/atlas/comp.atlas",Laya.Handler.create(this,onLoaded)); function onLoaded(){ //实例UI界面 var testView = ui.test.TestPageUI(); Laya.stage.addChild(testView); } ``` `WorkerLoader.workerPath = "libs/worker.js";`设置worker.js的路径,这个wor...
来源: Laya2.0_文档 发布时间: 20210715
... Parameters url: string Returns boolean load load(url: string, complete?: Handler): Promise<void> Defined in laya/resource/Texture.ts:277 加载指定地址的图片。 Parameters url: string 图片地址。 Optional complete: Handler 加载完成回调 Returns Promise<void> off off(type...
来源: Laya3.0_api 发布时间: 20231115
...rarchy alpha anchorX anchorY blendMode bottom cacheAs centerX centerY clickHandler components customRenderEnable dataSource destroyed disabled displayHeight displayWidth displayedInStage drawCallOptimize filters globalRotation globalScaleX globalScaleY graphics gray height hideFlags hitArea iconOffs...
来源: Laya3.0_api 发布时间: 20231115
...ad(["res/atlas/test.atlas", "test/1.png", "test/2.png", "test/3.png"],Laya.Handler.create(this,this.onComplete)); } }.bind(this)); }else { Laya.loader.load("res/atlas/test.atlas",Laya.Handler.create(this,this.onComplete)); } } onComplete(): void { //初始化rank排行榜 var rank = new BigR...
来源: Laya_社区 发布时间: 20190307
...如下: ```typescript //3d场景加载 Laya.Scene3D.load("xx/xx.ls",Laya.Handler.create(null,function(scene){ //加载完成后,把加载回调中返回的完整场景scene添加到舞台 Laya.stage.addChild(scene); //获取摄像机 var camera = scene.getChildByName("Main Camera"); /** ** 省...
来源: Laya2.0_文档 发布时间: 20210714
...一个 Dialog 实例。 package { import laya.ui.Dialog; import laya.utils.Handler; public class Dialog_Example { private var dialog:Dialog_Instance; public function Dialog_Example() { Laya.init(640, 800);//设置游戏画布宽高、渲染模式。 Laya.stage.bgColor = "#efefef";//设置画布的...
来源: Laya3.0_api 发布时间: 20231115
... "res/building.png", // 你的建筑图片路径 Laya.Handler.create(this, () => { // 加载完成后绘制到building Sprite上 let texture = Laya.loader.getRes("res/building.png"); this.building.graphic...
来源: Laya_社区 发布时间: 20251125
...加到舞台上。 package { import laya.ui.ProgressBar; import laya.utils.Handler; public class ProgressBar_Example { private var progressBar:ProgressBar; public function ProgressBar_Example() { Laya.init(640, 800);//设置游戏画布宽高。 Laya.stage.bgColor = "#efefef";//设置画布的背景...
来源: Laya3.0_api 发布时间: 20231115
...ScrollBar 实例。 package { import laya.ui.HScrollBar; import laya.utils.Handler; public class HScrollBar_Example { private var hScrollBar:HScrollBar; public function HScrollBar_Example() { Laya.init(640, 800);//设置游戏画布宽高。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜...
来源: Laya3.0_api 发布时间: 20231115