摘要:
/// 查找所有命名为ground的精灵节点
enumerateChildNodes(withName: "//ground") { (node, _ ) in
/// 如果当前的节点 + scene.size.with < 则移动节点
if node.position.x + self.size.width < camera.position.x {
node.position.x += self.size.width * SCENE_NUMBERS /// 更新节点的位置
}
} 阅读全文
/// 查找所有命名为ground的精灵节点
enumerateChildNodes(withName: "//ground") { (node, _ ) in
/// 如果当前的节点 + scene.size.with < 则移动节点
if node.position.x + self.size.width < camera.position.x {
node.position.x += self.size.width * SCENE_NUMBERS /// 更新节点的位置
}
} 阅读全文
posted @ 2018-07-03 12:05
布袋
阅读(793)
评论(0)
推荐(0)

浙公网安备 33010602011771号