大约有 59 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0071 秒)
...er.load("res/atlas/comp.atlas",Laya.Handler.create(this,this.onLoaded)); } private onLoaded():void{ //实例UI界面 var testView:ui.test.TestPageUI = new ui.test.TestPageUI(); Laya.stage.addChild(testView); } } new LayaUISample; ``` `WorkerLoader.workerPath = "libs/worker.js";`设置worker.js的路...
来源: Laya2.0_文档 发布时间: 20210715
...loader.load("lang.lang",Handler.create(this,onLoaded),null,Loader.JSON); } private function onLoaded():void { var obj:Object=Laya.loader.getRes("lang.lang"); Text.langPacks=obj; var texts:Text=new Text(); texts.text="hello!welcom LayaBox"; Laya.stage.addChild(texts); } } } 2016-10-18 1 0 分享 ...
来源: Laya_社区 发布时间: 20161018
...der.load("../atlas/comp.atlas",Laya.Handler.create(this,this.onLoaded)); } private onLoaded():void{ //实例UI界面 var testView:ui.test.TestPageUI = new ui.test.TestPageUI(); Laya.stage.addChild(testView); } } new LayaUISample; WorkerLoader.workerPath = "libs/worker.js"; 设置worker.js的路径...
来源: Laya3.0_文档 发布时间: 20251010
...atlas/comp.json", type: Loader.ATLAS}], Handler.create(this, onLoaded)); } private function onLoaded():void { //实例UI界面 var testView:TestView = new TestView(); Laya.stage.addChild(testView); } } } ``` `WorkerLoader.workerPath = "libs/worker.js";`设置worker.js的路径,这个worker.js...
来源: Laya2.0_文档 发布时间: 20210715
...3; ... export class AnimationScript extends Laya.AnimatorStateScript { ... private model: Laya.Sprite3D; /**@internal */ setPlayScriptInfo(animator: Laya.Animator | Laya.Animator2D, layerindex: number, playstate: Laya.AnimatorState | Laya.AnimatorState2D) { ... this.model = animator.owner as Laya.Sp...
来源: Laya3.0_文档 发布时间: 20251010
...Transform},isLoad:false}); }); } //激活资源版本控制 beginLoad(); } private function beginLoad():void { //加载引擎需要的资源 Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, onLoaded)); } private function onLoad2():void { Laya.timer.once(2000, this, onLoaded); } private ...
来源: Laya_社区 发布时间: 20180525
...示: /* ……省略若干代码 */ /**增加圆锥形刚体碰撞器 */ private addCone(): void { //生成随机值半径和高 let raidius = Math.random() * 0.2 + 0.2; let height = Math.random() * 0.5 + 0.8; //创建圆锥形3D模型节点对象 let cone = new Laya.Sprite3D; let coneMesh = cone....
来源: Laya3.0_文档 发布时间: 20251010
...script /* ……省略若干代码 */ /**增加圆锥形刚体碰撞器 */ private addCone(): void { //生成随机值半径和高 let raidius = Math.random() * 0.2 + 0.2; let height = Math.random() * 0.5 + 0.8; //创建圆锥形3D模型节点对象 let cone = new Laya.MeshSprite3D(Laya.PrimitiveMes...
来源: Laya2.0_文档 发布时间: 20210715
...ce/ui/check.png", Handler.create(this,onLoadComplete));//加载资源。 } private function onLoadComplete():void { trace("资源加载完成!"); var checkBox:CheckBox = new CheckBox("resource/ui/check.png", "这个是一个CheckBox组件。");//创建一个 CheckBox 类的实例对象 checkBox ,...
来源: Laya3.0_api 发布时间: 20231115
...e/ui/button.png", Handler.create(this,onLoadComplete));//加载资源。 } private function onLoadComplete():void { trace("资源加载完成!"); var button:Button = new Button("resource/ui/button.png","label");//创建一个 Button 类的实例对象 button ,并传入它的皮肤。 button.x = 10...
来源: Laya3.0_api 发布时间: 20231115