Let's say I have 5 SKLabelNode
s. Each is named incrementally. myLabel0
,myLabel1
etc... They are all added to a SKScene
. How do I set and get the label with a string. Something like:
for i in 0..5 {
self["mylabel\(i)"].text = "Label \(i)"
}
I know that in other languages you can do things similar to this.