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

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

41. 写的更换纹理的代码不生效,大佬帮忙看一下。(工程附件已经上传) [ 80%]

...有能够清除这个节点的纹理                 (this.owner as Laya.Sprite).graphics.clear();                 var t: Laya.Texture = Laya.loader.getRes("puzzlePic/pi-" +this.levelNum +"-"+this.owner.name.slice(4,1)+ "-2.png");               ...

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

42. 2.0TS3D物体碰撞,如何获取双方包围盒 [ 80%]

...r: Laya.PhysicsComponent): void { console.log("box2_onTriggerStay " + this.owner.name + " "+ other.owner.name); let b1:Laya.BoundBox = this.box.meshRenderer.boundingBox; let box2:Laya.MeshSprite3D = other.owner as Laya.MeshSprite3D; let b2:Laya.BoundBox = box2.meshRenderer.boundingBox; }获取boundi...

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

43. 2.6物理问题 [ 80%]

...地面都设置了弹力   TestScript2  onAwake   this.scene3D = this.owner as Scene3D; this.basketballCourt = this.scene3D.getChildByName("BasketballCourt") as Sprite3D; var collision:PhysicsCollider = this.basketballCourt.getChildByName("BasketballCourt1").getComponent(PhysicsCollider); collis...

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

44. 一个技术文档的问题 [ 78%]

...件实例**/ private monkeyBox: Laya.Sprite; constructor() { } /** *设置owner函数,可以直接获取到添加附加脚本的组件实例 **/ public set owner(value: any) { this.monkeyBox = value; //自定义的脚本会有时序问题,所以在此添加一个延时 this.monkeyBox.frameOnce(2...

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

45. box2d动态创建绑定多个关节报错 Node:the component is singleton,can't add the second one. [ 78%]

...tes[0].y); let potOther = new Laya.Point(pointes[0].x, pointes[0].y); self.owner.globalToLocal(potSelf);  other.owner.globalToLocal(potOther);  var distanceJoint = new Laya.DistanceJoint();   distanceJoint.otherBody = other.rigidBody; distanceJoint.otherAnchor = [potOther.x, potOther.y] distanceJ...

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

46. 龙骨动画demo [ 78%]

...ame = skeleton.getAniNameByIndex(num - 1); skeleton.play(name) }));  this.owner.addChild(skeleton); 2019-04-16 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 laozhou 赞同来自: //创建一个Skeleton对象 var...

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

47. 初次加载场景正确,返回后只加载第一个场景 [ 77%]

...大,没有打包         console.log("目标所属的OWER"+this.owner.name + "");         console.log("目标所属的OWER:"+this.owner.name.slice(12,13) + "");         Laya.Scene.open("test/PuzzleScene"+this.owner.name.slice(12,13)+".scene",true,null,null,null); 附件...

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

48. Camera.viewportToRay中origin与direction相等问题 [ 77%]

...ce.mainCamera.viewportPointToRay(this._rayPt, this._ray); let scene = this.owner.scene as Laya.Scene3D; scene.physicsSimulation.rayCast(this._ray, this._raycastHit); console.log(this._raycastHit.succeeded); if(this._raycastHit.succeeded) console.log(this._raycastHit.collider.owner.name); } GameManag...

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

49. 位图字体生效 [ 77%]

...加上就不生效了 txt.fontSize=60; txt.name='CEshi' txt.zOrder=2; this.owner.addChild(txt); console.log(this.owner) } 附件 : --> 2019-11-08 添加评论 已悬赏10元 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 vvv123 赞同...

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

50. 要让2DUI跟随3D物件,比如说敌人头上有血条。请问要怎么做? [ 77%]

...户 赞同来自: let out = window.app.fcUtil.worldToViewportPoint(this.owner.transform.position, window.GameMag.Camera1); this.hpNode.x = out.x - this.hpNode.width / 2 this.hpNode.y = out.y + this.hpNode.height *3.5 //this.owner.transform 3d的物体 //this.hpNode 2d的ui   //3d坐...

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