大约有 31 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0067 秒)
...enParticleSystem: Array<ShurikenParticleSystem>= []; constructor() { super(); } //通过传入粒子特效的路径,创建一个粒子特效,从对象池里拿一个 static Create(path: string): Particle3D { var ret:Particle3D = Pool.getInstance().getItemByClass("Particle3D@" + path, Parti...
来源: Laya3.0_文档 发布时间: 20250104
...: class HttpRequestExtension extends Laya.HttpRequest { constructor() { super(); } public send(url:string,data:any=null,method:string="get", responseType:string="text", headers:any=null):void{ super.send(url,data,method,responseType,headers); this._http.upload.onprogress= function(e:any):void { //...
来源: Laya3.0_文档 发布时间: 20250104
...ext: Laya.Text; /**盒子等级 */ private _level: number; constructor() { super(); } //组件被启用后执行 onEnable(): void { this._level = Math.round(Math.random() * 5) + 1; this._text = this.owner.getChildByName("levelTxt") as Laya.Text; this._text.text = this._level + ""; } //每帧更新...
来源: Laya3.0_文档 发布时间: 20251010
...aya.stage.addChild(tree);//将 tree 添加到显示列表。 } (function (_super) { function Item() { Item.__super.call(this);//初始化父类。 this.right = 0; this.left = 0; var selectBox = new laya.ui.Clip("resource/ui/clip_selectBox.png", 1, 2); selectBox.name = "selectBox";//设置 selectBox ...
来源: Laya3.0_api 发布时间: 20231115
...blic curpos: Laya.Vector3; private delatpos: Laya.Vector3; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 * 此方法为虚方法,使用时重写覆盖即可 */ onAwake(): void { this.curpos = new Laya.Vector3();...
来源: Laya3.0_文档 发布时间: 20251010
... = layerindex; this.playStateInfo.playState = playstate; } constructor() { super(); } /** * 动画状态开始时执行。 */ onStateEnter(): void { console.log("动画开始播放了"); } /** * 动画状态运行中 * @param normalizeTime 0-1动画播放状态 */ onStateUpdate(normalizeTime: number...
来源: Laya3.0_文档 发布时间: 20251010
...属性值。 label.size(100, 20); addChild(label); } } example (function (_super){ function Item(){ Item.__super.call(this);//初始化父类 this.graphics.drawRect(0, 0, 100, 20, "#ff0000"); var label = new laya.ui.Label();//创建一个 Label 类的实例对象 label 。 label.text = "100000";//...
来源: Laya3.0_api 发布时间: 20231115
... laya.utils.Handler.create(this, loadComplete));//加载资源 (function (_super) {//新建一个类Dialog_Instance继承自laya.ui.Dialog。 function Dialog_Instance() { Dialog_Instance.__super.call(this);//初始化父类 var bg = new laya.ui.Image("resource/ui/bg.png");//新建一个 Image 类的...
来源: Laya3.0_api 发布时间: 20231115
...例 */ export default class TSDemo extends Laya.Script3D { constructor() { super(); } } 2D脚本与3D脚本不要混用,如果是用IDE创建的脚本模板,需要将继承的2D脚本类(Laya.Script)改为3D脚本类(Laya.Script3D), 添加物理脚本 只有为节点添加了我们自...
来源: Laya3.0_文档 发布时间: 20251010
...t { @property({ type: Laya.Sprite3D }) sp3: Laya.Sprite3D; constructor() { super(); } onEnable() { console.log("Game onStart", this.sp3.name); } } 除非有特别的需求,我们并不建议这样做,一方面是因为静态物体更有利于IDE内进行编辑。另一方面是因为场景编辑...
来源: Laya3.0_文档 发布时间: 20251010