I'm creating a game with spriteKit. I have made a SKSpriteNode that when tapped jumps. To calculate a score I would like to use an updated variable that I can use in didMove.
I've tried using the a override func update (outside didMove) to update the height before every frame, but I'm not able use in didMove.
This is what I tried:
override func update(_ currentTime: CFTimeInterval) {
let ballPosition:Int = Int((ball?.position.y)!)
}
Thanks in advance.