大约有 225 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0041 秒)
...enemyHit); var _enemy=this.enemyHit.collider.owner as Laya.Sprite3D; if(_enemy.layer==6) { if(this.enemy!=null)return console.log("检测...
来源: Laya_社区 发布时间: 20231120
...sition.y = this.touch.position.y; //根据移动的距离进行旋转 this.owner.transform.rotate(new Laya.Vector3(1 * deltaY /2, 1 * deltaX / 2, 0), true, false); } } else if (2 === touchCount){ this._text.text = "触控点为2"; this.isTwoTouch = true; //获取两个触碰点 var touch = this._sce...
来源: Laya2.0_文档 发布时间: 20210715
...sition.y = this.touch.position.y; //根据移动的距离进行旋转 this.owner.transform.rotate(new Laya.Vector3(1 * deltaY /2, 1 * deltaX / 2, 0), true, false); } } else if (2 === touchCount){ this._text.text = "触控点为2"; this.isTwoTouch = true; //获取两个触碰点 var touch = this._sce...
来源: Laya2.0_文档 发布时间: 20210715
...此方法只执行一次 */ onAwake() { //得到3D对象 this.obj = this.owner; } onStart() { } /** * 覆写组件更新方法(相当于帧循环) */ onUpdate() { //所属脚本对象旋转更新 this.obj.transform.rotate(this.rotation, false, false) } onDisable() { console.log("组件设置为...
来源: Laya_社区 发布时间: 20200611
...收事件的;需要再添加下面代码所示的右键Up监听: this.owner.on(Laya.Event.RIGHT_MOUSE_UP, this, this.onRightMouseUp); 2025-02-21 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 仓颉 相关问题 TextInput重写onFocu...
来源: Laya_社区 发布时间: 20250220
...= 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
... 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
... public animator:Laya.Animator = null; public Init(){ this.sprite = this.owner as Laya.Sprite3D; this.animator = this.sprite.getComponent(Laya.Animator) as Laya.Animator; console.log("11"); } public RoleMove(dir:Laya.Vector3) { let norDir:Laya.Vector3 = Laya.Vector3.ZERO; Laya.Vector3.normalize(...
来源: Laya_社区 发布时间: 20191026
...n(() => { this.createBtn(); this.createvbox(); // 添加VBox组件 this.owner.addChild(this.vbox); }); } // 创建Button组件 private createBtn(): void { this.btn1 = new Laya.Button(this.skins); this.btn2 = new Laya.Button(this.skins); this.btn3 = new Laya.Button(this.skins); } // 创建VBox组...
来源: Laya3.0_文档 发布时间: 20251010
... 与内容相关的链接 提交 2 个回复 nevercai 赞同来自: this.owner.graphics["_one"] JS就是这点强大,什么都能访问,管你什么private,protected,还能覆盖原有的方法,属性。 2019-02-28 0 0 分享 微博 QZONE 微信 安 赞同来自: this.graphics._one....
来源: Laya_社区 发布时间: 20190228