Declaring global variables in Swift 3 Error
|Added at||2017-01-02 18:01|
I'm doing a game with Swift 3 and SpriteKit and I'm trying to declare a global variable to work with it in the rest of the GameScene class but I can't. What I did:
After the global declaration I tried to use it in the sceneDidLoad just like that:
I don't know why but Xcode returns this error:
Thanks in advance for your ideas and solutions!