Access array in GameScene from SKSpriteNode class instance?
问题 I've created an array in my GameScene instance, and populated it inside didMove(to view: )... From an instance of an SKSpriteNode, how do I access a value in that array? So far as I know, from the template, I don't have a reference to the GameScene instance. But I could be way off on this, too. 回答1: While the answer you've linked to will solve your problem, it introduces a coupling between the node and the scene which you might regret later. A more robust solution would allow the node to