I’m learning Godot, and this is what I have so far.
Source code on Github and it works with Godot 3.1.1