大约有 828 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0088 秒)
Laya_社区(538) Laya2.0_文档(154) Laya_示例(51) Laya2.0_示例(43) Laya3.0_api(23) Laya3.0_文档(17) laya_api(1) Laya2.0_api(1)
...UI界面添加到舞台上 Laya.loader.load("./res/atlas/comp.atlas",Laya.Handler.create(this,onLoaded)); function onLoaded(){ //实例化导出的UI类 var efc = new ui.TestPUI(); //添加到舞台 Laya.stage.addChild(efc); } ``` 运行后,按钮被按下时,动画效果如动图11所示: ![1...
来源: Laya2.0_文档 发布时间: 20210715
... (function () { var Loader = Laya.Loader; var Browser = Laya.Browser; var Handler = Laya.Handler; console.log("!____________________________________") var ProtoBuf = Browser.window.protobuf; // Laya.init(550, 400); ProtoBuf.load("res/protobuf/Login.proto", onAssetsLoaded); function onAssetsL...
来源: Laya_社区 发布时间: 20180704
...orPicker 实例。 package { import laya.ui.ColorPicker; import laya.utils.Handler; public class ColorPicker_Example { public function ColorPicker_Example() { Laya.init(640, 800);//设置游戏画布宽高。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 Laya.loader.load("resource/...
来源: Laya3.0_api 发布时间: 20231115
... Example,并添加到舞台显示 Laya.loader.load("js/loading100.js", Handler.create(this, complete), null, Loader.TEXT); } private function complete(data:*):void { trace("ok3") __JS__("window.eval(data)"); //此行报错 var load:* = __JS__('new loading100()'); Laya.stage.addChild(load); trace("...
来源: Laya_社区 发布时间: 20170725
... "res/building.png", // 你的建筑图片路径 Laya.Handler.create(this, () => { // 加载完成后绘制到building Sprite上 let texture = Laya.loader.getRes("res/building.png"); this.building.graphic...
来源: Laya_社区 发布时间: 20251125
... ComboBox 实例。 package { import laya.ui.ComboBox; import laya.utils.Handler; public class ComboBox_Example { public function ComboBox_Example() { Laya.init(640, 800);//设置游戏画布宽高。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 Laya.loader.load("resource/ui/butto...
来源: Laya3.0_api 发布时间: 20231115
...//加载引擎需要的资源 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
...Info.onLoaded (http://127.0.0.1:59022/game/code.js:12995:61) at EventHandler.__proto.runWith (http://127.0.0.1:59022/game/code.js:711:59) at ResInfo.__proto.event (http://127.0.0.1:59022/game/code.js:483:28) at LoaderManager.__proto._endLoad (http://127.0.0.1:59022/game/code.js:131...
来源: Laya_社区 发布时间: 20180317
...载资源成功后,执行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
...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