【发布时间】:2017-08-28 19:53:58
【问题描述】:
我想像这样选择一个孩子的孩子:
var button = childNode(withName: "button") as! SKSpriteNode
在SKSpriteNode“警报”内有SKSpriteNode“按钮”
【问题讨论】:
标签: swift swift3 sprite-kit children
我想像这样选择一个孩子的孩子:
var button = childNode(withName: "button") as! SKSpriteNode
在SKSpriteNode“警报”内有SKSpriteNode“按钮”
【问题讨论】:
标签: swift swift3 sprite-kit children
在选择子使用时childNode(withName: "button") 987654322 @ self是您在(或场景)中的任何类。要调用对象的子对象,请使用...
let alert = self.childNode(withName: "alert") as! SKSpriteNode
var button = alert.childNode(withName: "button") as! SKSpriteNode
【讨论】: