swift - SKSpriteNodes in SKView -
i trying skspritenodes in skview change alpha. here's code:
if let nodes = self.gameskview.scene!.children as? [skspritenode] { node in nodes { if node.name != "bg" { node.alpha = 0 } } } with codes, nodes nil when print in gameskview not nil.
println("\(self.gameskview.scene!.children)") can try me? in advance.
self.gameskview.scene!.children as? [skspritenode] is non-null if all children skspritenode - as? not filter select elements of particular type, it's type-safe "cast".
i's difficult provide advice how want without knowing want accomplish , more of code.
Comments
Post a Comment