1
我试图得到一个基于答案here和this如何获得视图中的孩子精灵位置
for child in platformGroupNode.children {
CGPoint p = [child.superview convertPoint:child.center toNode:self.view ]
println(p)
}
但是我不能确定如何与SKSpriteNode
儿童使用此视图孩子精灵位置和SKNode
父母。
我也试过这个没有运气
for child in platformGroupNode.children {
var pos = child.position
var viewPos = convertPoint(pos, toNode: self.parent!)
if viewPos.x < 0 {
println("Out of screen")
}
}
好东西。再次感谢伴侣 – Yonkee