I am stuck on a problem and I didn’t know where else to turn so I decided to try it here. I am working on a game app where letters appear all over the SpriteKit screen and right now when you touch the screen the letters disappear. Now, I set up a node called touchedNode which is of type SKNode() and when I run it I get this information each time I touch a letter.
Optional( name:‘letters’ text:‘E’ fontName:‘Futura’ position:{418, 273})
Optional( name:‘letters’ text:‘D’ fontName:‘Futura’ position:{245, 158})
Optional( name:‘letters’ text:‘A’ fontName:‘Futura’ position:{498, 205})
Optional( name:‘letters’ text:‘D’ fontName:‘Futura’ position:{259, 170})
I feel there should be an easy way to get the text information from the touchedNode. I can get the name, touchedNode.name will give me Optional(“letters”) but if I say touchedNode.text there’s an error because SKNode() doesn’t have text. That said, how do I get the text information from the touchedNode and get rid of the Optional part as well?