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

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

1. 当屏幕尺寸,缩放模式,横竖屏 发生改变时会报错Uncaught TypeError: Cannot read property 'length' of null [ 100%]

...,当destroy函数调用时会把子节点销毁,所以public function get numChildren(){} 被调用时child为空 所以报错,算是引擎的bug吧,将原函数改为public function get numChildren():int {             trace(this);             if (!this._childs){           ...

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

2. Cannot read property '_getBit' of undefined [ 97%]

...错。   添加方法:this.m_MainScene.addChildAt(sc, this.m_MainScene.numChildren - 1);   移除方法:this.m_MainScene.removeChild(sc); 附件 : --> 2019-01-12 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回...

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

3. destroy节点后,报错 [ 79%]

...舞台移除模型对象 @param node 节点 */ base_remove(node){ if(node.numChildren<=0)return; console.log('移除',node.name); let obj; for(let i=node.numChildren-1;i>=0;i--){ obj= node.getChildAt(i); obj.destroy(); } }   或者 /* 从舞台移除模型对象 @param node 节点 */ base_rem...

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

4. 多场景跳转遇到当前场景不能remove的问题 [ 60%]

...在? Supermang42 • 2018-08-17 10:44 for( let i = 0; i < Laya.stage.numChildren; i++ ) { console.log( Laya.stage.getChild(i) ); } 153*****476 • 2018-08-17 13:17 多谢,按你的方法我找到问题了,是我的逻辑有问题,场景加载了两次。 Supermang42 • 2018-08-17 13:33 :...

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

5. 为什么会出现报错 ani not found:ufo1_down [ 52%]

...Loop() { // 遍历所有飞机,更改飞机状态 for(var i = Laya.stage.numChildren - 1; i > 0; i--) { // 接收舞台子对象 var role = Laya.stage.getChildAt(i); // 判断是否有飞机,并且是否有速度值 if(role && role.speed){ // 根据飞机速度更改飞机的位置 ro...

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

6. 为什么会出现报错 ani not found:ufo1_down [ 50%]

...Loop() { // 遍历所有飞机,更改飞机状态 for(var i = Laya.stage.numChildren - 1; i > 0; i--) { // 接收舞台子对象 var role = Laya.stage.getChildAt(i); // 判断是否有飞机,并且是否有速度值 if(role && role.speed){ // 根据飞机速度更改飞机的位置 ro...

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

7. VR的demo有没有加载3D场景的啊,实在不知怎么加 [ 48%]

...(Laya.Event.HIERARCHY_LOADED, null, function(sprite) { //console.log(scene.numChildren+","+sprite._childs.length); setMeshParams(sprite, Laya.StandardMaterial.RENDERMODE_OPAQUE, new Laya.Vector4(3.5, 3.5, 3.5, 1.0), new Laya.Vector3(0.6823, 0.6549, 0.6352), new Laya.Vector2(25.0, 25.0), "TERRAIN"); ...

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