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

大约有 493 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0043 秒)

21. 创建多个Sprite对象后,再次取出来的时候坐标全为0,0高宽跟创建时的也不一样 [ 79%]

...置的Sprite并设置了不同坐标以及相同大小之后,再次根据getChildByName()获取出来时x,y坐标居然是0,0而且高度跟宽度也会变化很多,请问是什么原因?打印信息我已经加上 附件 : --> DataTest.zip 2018-04-27 添加评论 已悬赏3元 --> 分享 微博...

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

22. 资源加载(TypeScript-3D基础(TS)-LayaAir3D之资源加载) [ 79%]

...Scene3d Laya.stage.addChild(scene); //获取摄像机 var camera = scene.getChildByName("Main Camera"); //清除摄像机的标记 camera.clearFlag = Laya.BaseCamera.CLEARFLAG_SKY; //添加光照 var directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.color = new Laya.Vector3(...

来源: Laya2.0_文档 发布时间: 20210715

23. 关于3d的碰撞检测 [ 78%]

...结果一直是-1 相关代码:const field: Laya.MeshSprite3D = this.scene.getChildByName("stadium").getChildByName("field") as Laya.MeshSprite3D;//拿到地板 const sprite3d1MeshCollider: Laya.MeshCollider = field.addComponent(Laya.MeshCollider) as Laya.MeshCollider; sprite3d1MeshCollider.mesh = f...

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

24. 资源加载(JavaScript-3D基础(JS)-LayaAir3D之资源加载) [ 77%]

...Scene3d Laya.stage.addChild(scene); //获取摄像机 var camera = scene.getChildByName("Main Camera"); //清除摄像机的标记 camera.clearFlag = Laya.BaseCamera.CLEARFLAG_SKY; //添加光照 var directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.color = new Laya.Vector3(...

来源: Laya2.0_文档 发布时间: 20210715

25. 如何为list内部的button添加事件 [ 76%]

...交 2 个回复 cuixueying 赞同来自: 你可以通过list.getItem(xxx).getChildByName(),通过button的name属性得到button的引用,为button添加点击事件。 2017-01-05 0 3 分享 微博 QZONE 微信 weiyongwill 赞同来自: 这样需要用for语句对每个list元素操作一遍? ...

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

26. 微信小游戏运行导出项目的时候报错:Scene: the .lh file root type must be Scene [ 76%]

...(); Laya.stage.addChild(this._scene); var camera:Laya.Camera = this._scene.getChildByName("Main Camera") as Laya.Camera; camera.addComponent(CameraMoveScript); var tiger:Laya.Sprite3D = this._scene.getChildByName("tiger_idle") as Laya.Sprite3D; console.log(tiger); var animator:La...

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

27. 预设组件挂脚本,添加到场景以后赋值失败 [ 75%]

...值,其它组件的引用全是不对的   但是如果通过this.owner.getChildByName("testLb") 这种方式,就是正常的,这能优化下??????   附件 : --> demo5.zip 2021-10-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内...

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

28. laya2 物理引擎好多问题 [ 74%]

... ni.wrapMode=0; ni.play(0,false);  var man:Laya.Sprite= this.owner.parent.getChildByName('man') as Laya.Sprite; var cil2:Laya.PolygonCollider=man.getComponent(Laya.PolygonCollider); var rig2:Laya.RigidBody=man.getComponent(Laya.RigidBody); var mou:Laya.MouseJoint=man.getComponent(Laya.MouseJoint); ...

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

29. 我竟然被射线检测这个小功能给难了一天了 [ 74%]

...) physics:Laya.PhysicsSimulation; onAwake():void{ this.camera = this.owner.getChildByName("Main Camera") as Laya.Camera; let scene: Laya.Scene3D = this.owner.scene as Laya.Scene3D;   this.physics=scene.physicsSimulation;     console.log("相机位置",(this.owner.getChildByName("Main Camera") as ...

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

30. 播放粒子没反应 [ 73%]

播放粒子没反应 使用unity导出粒子this.parAni = this.path2.getChildByName("anjian").getChildByName("huang").particleSystem;然后使用this.parAni.play();播放没有效果 2019-01-03 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相...

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