大约有 143 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0039 秒)
Laya3.0_api(61) Laya3.0_文档(44) Laya_社区(16) Laya2.0_api(7) laya_api(6) Laya2.0_文档(5) Laya2.0_示例(2) Laya_示例(2)
...签 treeData += "</data>"; //把字符串解析为xml对象并返回 this.tree.xml = new Laya.XML(treeData); } } 这里给Tree列表赋的值,是写死的模拟数据。其中,拼接模拟数据,最多只能是二层结构,不支持层级很深的结构。 上述代码中,<dir>...
来源: Laya3.0_文档 发布时间: 20251010
...属性列表,比如{x:100,y:20,ease:Ease.backOut,complete:Handler.create(this,onComplete),update:new Handler(this,onComplete)}。 duration:int — 花费的时间,单位毫秒。 ease:Function (default = null) — 缓动类型,默认为匀速运动。 complete:Handler (default = null) ...
来源: Laya2.0_api 发布时间: 20190513
...* @param createFun 用于创建该类型对象的方法。 * @param caller this对象 * @return 此类型标识的一个对象。 */ static getItemByCreateFun(sign: string, createFun: Function, caller: any = null): any { var pool: any[] = Pool.getPoolBySign(sign); var rst: any = pool.length ? pool.p...
来源: Laya3.0_文档 发布时间: 20251010
...需要的资源 Laya.loader.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"; ...
来源: Laya3.0_文档 发布时间: 20251010
...事件监听方式和Laya.Script命名函数方式处理输入。例如: this.aNode.on(Laya.Event.CLICK, ()=> { console.log("clicked"); }); class MyScript extends Laya.Script { //脚本事件 onMouseClick(e:Event) { console.log("clicked"); } } aNode.addComponent(MyScript); 以上两种方式是...
来源: Laya3.0_文档 发布时间: 20251010
...和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.panel.pos(100, 100); this.panel.size(200, 200); this.panel.scrollType = Laya.ScrollType.Both; //滚动类型:水平与垂直都滚动 this.panel.vScrollBarSkin = "atlas/comp/vscroll.png"; this.panel.hScrollBarSkin = "atl...
来源: Laya3.0_文档 发布时间: 20251010
...取当前位置 Laya.Geolocation.getCurrentPosition( Laya.Handler.create(this, this.onSuccess), Laya.Handler.create(this, this.onError) ); console.log("click"); } // 成功获取位置后触发 onSuccess(info: Laya.GeolocationInfo): void { console.log('经纬度: (' + info.longitude + '°, ' + info....
来源: Laya3.0_文档 发布时间: 20251010
...组件均已创建完毕,此方法只执行一次 */ onAwake(): void { this.lab.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置 this.lab.size(500, 30); //大小 this.lab.pivot(this.lab.width/2, this.lab.height/2); //轴心点 this.lab.text = "大家好,欢迎大家来到...
来源: Laya3.0_文档 发布时间: 20251010
...a.TextArea; private text: Laya.Label = new Laya.Label(); onAwake(): void { this.initUI(); this.connect(); } /** * 初始化UI */ private initUI(): void { this.showLogger(); this.text.text = "请查看源码和调试信息,了解如何使用"; this.text.color = "#FFFFFF"; this.text.font = "Impact";...
来源: Laya3.0_文档 发布时间: 20251010
...yFont"; constructor() {super();} onAwake(): void { //加载位位图字体 this.loadBitmapFont(); } /** * 实例化位图字体类,并加载位图字体 */ loadBitmapFont(): void { let bitmapFont: Laya.BitmapFont = new Laya.BitmapFont(); bitmapFont.loadFont("res/vvv.fnt", new Laya.Handler(this, th...
来源: Laya2.0_文档 发布时间: 20210715