摘要: 1、预制体 1)节点操作 Cc.find(‘node-1’) 获取节点 全局事件 作用于 canvas this.node.destroy() 删除节点(从内存中删除) 添加删除获取节点或组件 let node = new cc.Node() 生成新节点 let sprite this.node.a 阅读全文
posted @ 2018-09-13 10:29 JoeJoan 阅读(683) 评论(0) 推荐(0) 编辑
摘要: 1.节点 编辑组件的脚本文件时。可以通过以下语句获得节点 this 就是当前组件 this.node 拿到组件依附的节点 This.node.parent 拿到组件依附的节点 的父节点 This.node.children 拿到组件依附的节点 的子节点 this.node.getChildByNam 阅读全文
posted @ 2018-09-13 10:17 JoeJoan 阅读(1681) 评论(0) 推荐(1) 编辑