0
이 열거 형을 어떻게 중지합니까? 나는 다음 코드와 Xcode가 상수가되도록 값을 할당 할 수 없다는 불평이있다. 멈추는 것은 아마 간단한 일이지만 나는 Swift와 함께 꽤 noobie입니다. 그러니 나와 함께 견뎌주십시오.'enumerateChildNodesWithName ("// *")'열거를 중지하는 방법?
self.enumerateChildNodesWithName("//*") {
spaceshipNode, stop in
if ((spaceshipNode.name?.hasSuffix("ship")) != nil) {
for enemyNode in self.children {
if (enemyNode.name == "enemy"){
if(enemyNode.containsPoint(spaceshipNode.position)){
self.gotoGameOverScene(spaceshipNode)
stop = true // Error: Cannot assign to value: 'stop' is a 'let' constant
}
}
}
}
}
무엇 빠른 3에 대해? –
@FabianRios, 업데이트 됨. – OOPer