SKSpriteNode does not have member named ''- how to access a variable declared in my spawn method?
问题 I asked another question before about how to access a global variable in Swift, but realized the global variable did not work for my purposes. Some background: The game is a math/match game. Player's will have an equation, and they have to get the sheep with the matching answer. I have sheep that spawn on screen. Each sheep holds a unique int value (1-12) that is generated within my spawnSheep method: var sheepValue: Int = Int(arc4random_uniform(UInt32(12))+1) Multiple sheep will spawn on