0
孩子,我想选择这样的孩子的孩子:
选择孩子的SWIFT 3
var button = childNode(withName: "button") as! SKSpriteNode
的SKSpriteNode
内部“通知”中,选择一个孩子使用时存在SKSpriteNode
“按钮”
孩子,我想选择这样的孩子的孩子:
选择孩子的SWIFT 3
var button = childNode(withName: "button") as! SKSpriteNode
的SKSpriteNode
内部“通知”中,选择一个孩子使用时存在SKSpriteNode
“按钮”
childNode(withName: "button")
这是self.childNode(withName: "button")
自己是你在(或场景)中的任何课程的简写。打电话给对象使用的孩子...
let alert = self.childNode(withName: "alert") as! SKSpriteNode
var button = alert.childNode(withName: "button") as! SKSpriteNode