• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 225 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0041 秒)

131. [LayaAir3]关于laya更新到3.1出现射线检测不到的情况 [ 63%]

...enemyHit);                     var _enemy=this.enemyHit.collider.owner as Laya.Sprite3D;                     if(_enemy.layer==6)                     {                         if(this.enemy!=null)return                         console.log("检测...

来源: Laya_社区 发布时间: 20231120

132. 多点触控的使用(JavaScript-3D基础(JS)-LayaAir3D之鼠标交互) [ 63%]

...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

133. 多点触控的使用(TypeScript-3D基础(TS)-LayaAir3D之鼠标交互) [ 63%]

...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

134. UNITY导出的模型旋转不了 [ 63%]

...此方法只执行一次 */ onAwake() { //得到3D对象 this.obj = this.owner; } onStart() { } /** * 覆写组件更新方法(相当于帧循环) */ onUpdate() { //所属脚本对象旋转更新 this.obj.transform.rotate(this.rotation, false, false) } onDisable() { console.log("组件设置为...

来源: Laya_社区 发布时间: 20200611

135. [LayaAir3]右键up删除不了监听 [ 63%]

...收事件的;需要再添加下面代码所示的右键Up监听: this.owner.on(Laya.Event.RIGHT_MOUSE_UP, this, this.onRightMouseUp); 2025-02-21 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 仓颉 相关问题 TextInput重写onFocu...

来源: Laya_社区 发布时间: 20250220

136. 精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 62%]

...= 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

137. HTTP通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 62%]

... 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

138. 动画混合问题,Avatar动画混合报错. [ 61%]

... 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

139. 垂直布局容器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 61%]

...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

140. UI编辑器里面创建了一个Graphics line,如何能获取组件编辑的的 points数据 [ 61%]

... 与内容相关的链接 提交 2 个回复 nevercai 赞同来自:  this.owner.graphics["_one"]    JS就是这点强大,什么都能访问,管你什么private,protected,还能覆盖原有的方法,属性。 2019-02-28 0 0 分享 微博 QZONE 微信 安 赞同来自: this.graphics._one....

来源: Laya_社区 发布时间: 20190228