Take a look at Singletons. They are persistent through game execution. Also, you can access nodes' public variables (or even functions) from another node, like this: var value = $node/path/at/scene.value (supposing value is your variable name)

17 days later

A bit late now, but if you're a Java developer, why not try Godot with C#? Being much closer to Java. Only problem is, no debugging ...

Attach a C# script to Nodes then they are just classes to you.

4 years later