大约有 42 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0041 秒)
...aya; @regClass() export class LabelControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.Label } ) public lab: Laya.Label; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake...
来源: Laya3.0_文档 发布时间: 20251010
...rue; this.twoFirst = true; } onStart(){ this._scene = this.owner.parent as Laya.Scene3D; this._text = this._scene.parent.getChildByName("ceshi") as Laya.Text; this._camera = this._scene.getChildByName("camera") as Laya.Camera; } onUpdate(){ var touchCo...
来源: Laya_社区 发布时间: 20190531
....spRole.texture.sourceHeight = Laya.stage.height; //添加2D精灵, this.owner.addChild(this.spRole); this.spRole.pos(0, 0); this.spRole.size(Laya.stage.width, Laya.stage.height); }); 2025-01-09 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定,...
来源: Laya_社区 发布时间: 20250109
...rue; this.twoFirst = true; } onStart(){ this._scene = this.owner.parent as Laya.Scene3D; this._text = this._scene.parent.getChildByName("ceshi") as Laya.Text; this._camera = this._scene.getChildByName("camera") as Laya.Camera; } onUpdate(){ var touchCo...
来源: Laya_社区 发布时间: 20190605
... RuntimeScript; onStart() { // 获得场景的Runtime对象 this.ui = this.owner.scene as RuntimeScript; // Button添加鼠标事件,让Image不显示 this.ui.Button.on( Laya.Event.MOUSE_DOWN, null, ()=>{ this.ui.Image.visible = false; }); } } ui 属性直接从脚本中通过 this.owner.scene ...
来源: Laya3.0_文档 发布时间: 20251010
...此方法只执行一次 */ onAwake() { //得到3D对象 this.obj = this.owner; } onStart() { } /** * 覆写组件更新方法(相当于帧循环) */ onUpdate() { //所属脚本对象旋转更新 this.obj.transform.rotate(this.rotation, false, false) } onDisable() { console.log("组件设置为...
来源: Laya_社区 发布时间: 20200611
... this.text.align = "center"; this.text.y = 20; this.text.centerX = 0; this.owner.addChild(this.text); } /** * 发起HTTP连接请求 */ private connect(): void { //创建HttpRequest对象 this.hr = new HttpRequest(); //请求响应的进度改变时触发 this.hr.on(Event.PROGRESS, this, this.onHttp...
来源: Laya3.0_文档 发布时间: 20251010
...; @regClass() export class TextAreaControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.TextArea } ) public txtarea: Laya.TextArea; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 ...
来源: Laya3.0_文档 发布时间: 20251010
...or3(0,0,0); } onStart(){ this.scene = this.owner.parent; this.text = this.scene.parent.getChildByName("ceshi"); this.camera = this.scene.getChildByName("camera"); } onUpdate(){ let touchCount = this.scene...
来源: Laya_社区 发布时间: 20190531
...= Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Sprite }) public sprite1: Laya.Sprite; @property({ type: Laya.Sprite }) public sprite2: Laya.Sprite; constructor() { super(); } /** * 组件被激活后执行,此时所有节点...
来源: Laya3.0_文档 发布时间: 20251010