What's the cleanest way to call a method from one SKScene to another in Swift?
So I got in my game 3 different scenes: MenuScene, GameScene and GameOverScene. I would like to know how I can get the score variable located in GameScene from GameOverScene so I can show it up there after the player loses. So in GameScene, I created this simple getter: func getScore() -> Int { return self.score } But if I try to do GameScene.getScore() from a different Scene I get an error. Tried using "class" before func class func getScore() -> Int { return self.score } But that also gives me an error from GameScene saying: "Instance member 'score' cannot be used on type GameScene" So how's