大约有 7 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0027 秒)
...,当destroy函数调用时会把子节点销毁,所以public function get numChildren(){} 被调用时child为空 所以报错,算是引擎的bug吧,将原函数改为public function get numChildren():int { trace(this); if (!this._childs){ ...
来源: Laya_社区 发布时间: 20170829
...错。 添加方法:this.m_MainScene.addChildAt(sc, this.m_MainScene.numChildren - 1); 移除方法:this.m_MainScene.removeChild(sc); 附件 : --> 2019-01-12 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回...
来源: Laya_社区 发布时间: 20190112
...舞台移除模型对象 @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
...在? 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
...Loop() { // 遍历所有飞机,更改飞机状态 for(var i = Laya.stage.numChildren - 1; i > 0; i--) { // 接收舞台子对象 var role = Laya.stage.getChildAt(i); // 判断是否有飞机,并且是否有速度值 if(role && role.speed){ // 根据飞机速度更改飞机的位置 ro...
来源: Laya_社区 发布时间: 20170525
...Loop() { // 遍历所有飞机,更改飞机状态 for(var i = Laya.stage.numChildren - 1; i > 0; i--) { // 接收舞台子对象 var role = Laya.stage.getChildAt(i); // 判断是否有飞机,并且是否有速度值 if(role && role.speed){ // 根据飞机速度更改飞机的位置 ro...
来源: Laya_社区 发布时间: 20170525
...(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