大约有 4,034 项符合查询结果, 库内数据总量为 30,906 项。 (搜索耗时: 0.0078 秒)
Laya_社区(3264) Laya2.0_文档(296) Laya_示例(141) Laya2.0_示例(117) Laya3.0_文档(107) Laya3.0_api(94) Laya2.0_api(9) laya_api(6)
...要这么做 2.ziti类中预加载字体,加载完成回调你写的是this.onLoaded。导致下边onLoaded函数根本就没有走,也更走不到init函数中 3.init函数中你给test的text赋值为this.labelFont.text,根据你这一步的做法可以猜到你是想用UI界面中的那个...
来源: Laya_社区 发布时间: 20170829
...property({ type : Laya.Sprite}) public spr: Laya.Sprite; onAwake(): void { this.spr.size(512, 313); //设置Sprite大小 this.spr.loadImage("atlas/comp/image.png"); //添加纹理 } } 效果如图1-2所示: (图1-2) 1.2 3D节点的基础使用 首先,如动图1-3所示,将场景中已经...
来源: Laya3.0_文档 发布时间: 20250103
.../attack state.clipStart = clipStart; state.clipEnd = clipEnd; state.clip = this._animator.getDefaultState().clip; this._animator.addState(state);每个状态的clip都是 this._animator.getDefaultState().clip 这个对象。 播放动作时,是根据动作类型设置是否循环。 this._animato...
来源: Laya_社区 发布时间: 20200410
...,预加载时报错,就是这里: laya.core.js的7430行 if (this._pos_+2 > this._length)throw "getUint16 error - Out of bounds"; 但是,不使用预加载,就不报错,只是不知道什么时候真的加载完成,那个_template不再为null,我就可以调用play了。 ...
来源: Laya_社区 发布时间: 20180622
...= new Laya.Sprite(); bigMask.graphics.drawRect(0, 0, 300, 200, "#ffffff"); this.mask = bigMask; // let imgMask:Laya.Sprite = new Laya.Sprite(); imgMask.graphics.drawRect(0, 0, 100, 300, "#ffffff"); this.img.mask = imgMask; Laya.Tween.to(this.img, {x:100}, 10000).update = Laya.Handler.create(this, th...
来源: Laya_社区 发布时间: 20190722
...距离容器的区域也会触发点击事件 function TransitionImg() { this.flag = false; //判断条件 this.img1 = "../laya/assets/comp/haoyoubang-liang.png"; //地址 this.img2 = "../laya/assets/comp/haoyuobang-hui.png"; var img = new Laya.Sprite(); //实例 img.width = 300; //宽高 img.height...
来源: Laya_社区 发布时间: 20180502
...../../"; Laya.loader.load("res/particles/GravityMode.part", Handler.create(this, onAssetsLoaded), null, Loader.JSON); })(); function onAssetsLoaded(settings) { sp = new Particle2D(settings); sp.emitter.start(); sp.play(); Laya.stage.addChild(sp); sp.x = Laya.stage.width / 2; sp.y = Laya.stage.height...
来源: Laya_示例 发布时间: 20250225
..._CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; this.drawSomething(); } private drawSomething(): void { this.sp = new Sprite(); Laya.stage.addChild(this.sp); //画线 this.sp.graphics.drawLine(10, 58, 146, 58, "#ff0000", 3); //画连续直线 this.sp.graphics.drawLines(176...
来源: Laya_示例 发布时间: 20250225
...和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.vslider.pos(300,300);//滑动条位置 this.vslider.skin = "resources/vslider.png";//滑动条底图皮肤 this.vslider.value = 0.5; this.vslider.max = 50; this.vslider.min = 0; this.vslider.tick = 1; this.vslider.showProg...
来源: Laya3.0_文档 发布时间: 20240910
...和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.hslider.pos(300, 300);//滑动条位置 this.hslider.skin = "resources/hslider.png";//滑动条底图皮肤 this.hslider.value = 0.5; this.hslider.max = 50; this.hslider.min = 0; this.hslider.tick = 1; this.hslider.showPro...
来源: Laya3.0_文档 发布时间: 20240910